From: Wolfgang Denk Date: Tue, 29 Jun 2010 21:36:07 +0200 Subject: [U-Boot] [PATCH v2] EHCI: zero out QH transfer overlay in ehci_submit_async() In-Reply-To: <201006282244.49973.sshtylyov@ru.mvista.com> References: <201006282244.49973.sshtylyov@ru.mvista.com> Message-ID: <20100629193607.B6DCF14EBF8@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Sergei Shtylyov, In message <201006282244.49973.sshtylyov@ru.mvista.com> you wrote: > ehci_submit_async() doesn't really zero out the QH transfer overlay (as the EHCI > specification suggests) which leads to the controller seeing the "token" field > as the previous call has left it, i.e.: > - if a timeout occured on the previous call (Active bit left as 1), controller > incorrectly tries to complete a previous transaction on a newly programmed > endpoint; > - if a halt occured on the previous call (Halted bit set to 1), controller just > ignores the newly programmed TD(s) and the function then keeps returning error > ad infinitum. > > This turned out to be caused by the wrong orger of the arguments to the memset() > call in ehci_alloc(), so the allocated TDs weren't cleared either. > > While at it, stop needlessly initializing the alternate next TD pointer in the > QH transfer overlay... > > Signed-off-by: Sergei Shtylyov > > --- > Initialization of 'qh->qh_overlay.qt_next' turned out to be needed by the error > cleanup code (seemingly useless, in its turn). > > This is quite serious bug, so would be good to have the patch in v2010.06... > > drivers/usb/host/ehci-hcd.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Small is beautiful.