From: Alan Stern Date: Wed, 27 May 2009 22:21:56 +0000 (-0400) Subject: USB: EHCI: update toggle state for linked QHs X-Git-Tag: v2.6.31-rc1~304^2~58 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b18ffd49e86102a9ed0a1cc83fdafe3891e844e5;p=pandora-kernel.git USB: EHCI: update toggle state for linked QHs This patch (as1245) fixes a bug in ehci-hcd. When an URB is queued for an endpoint whose QH is already in the LINKED state, the QH doesn't get refreshed. As a result, if usb_clear_halt() was called during the time that the QH was linked but idle, the data toggle value in the QH doesn't get reset. The symptom is that after a clear_halt, data gets lost and transfers time out. This problem is starting to show up now because the "ehci-hcd unlink speedups" patch causes QHs with no queued URBs to remain linked for a suitable time. The patch utilizes the new endpoint_reset mechanism to fix the problem. When an endpoint is reset, the new method forcibly unlinks the QH (if necessary) and safely updates the toggle value. This allows qh_update() to be simplified and avoids using usb_device's toggle bits in a rather unintuitive way. Signed-off-by: Alan Stern CC: David Brownell Tested-by: David Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed