]> Git Repo - linux.git/commit
USB: EHCI: fix two new bugs related to Clear-TT-Buffer
authorAlan Stern <[email protected]>
Fri, 31 Jul 2009 14:40:22 +0000 (10:40 -0400)
committerGreg Kroah-Hartman <[email protected]>
Fri, 7 Aug 2009 23:05:13 +0000 (16:05 -0700)
commit7a0f0d951273eee889c2441846842348ebc00a2a
tree268d5316e3c3d3bd0957d39d4233036790736965
parent01105a246345f011fde64d24a601090b646e9e4c
USB: EHCI: fix two new bugs related to Clear-TT-Buffer

This patch (as1273) fixes two(!) bugs introduced by the new
Clear-TT-Buffer implementation in ehci-hcd.

It is now possible for an idle QH to have some URBs on its
queue -- this will happen if a Clear-TT-Buffer is pending for
the QH's endpoint.  Consequently we should not issue a warning
when someone tries to unlink an URB from an idle QH; instead
we should process the request immediately.

The refcounts for QHs could get messed up, because
submit_async() would increment the refcount when calling
qh_link_async() and qh_link_async() would then refuse to link
the QH into the schedule if a Clear-TT-Buffer was pending.
Instead we should increment the refcount only when the QH
actually is added to the schedule.  The current code tries to
be clever by leaving the refcount alone if an unlink is
immediately followed by a relink; the patch changes this to an
unconditional decrement and increment (although they occur in
the opposite order).

Signed-off-by: Alan Stern <[email protected]>
CC: David Brownell <[email protected]>
Tested-by: Manuel Lauss <[email protected]>
Tested-by: Matthijs Kooijman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-q.c
This page took 0.042871 seconds and 4 git commands to generate.