USB: xhci: Handle babbling endpoints correctly.
commit9fa7825a00bb88d022a22d914646a1ce5e3ee5e0
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 27 Aug 2009 21:36:03 +0000 (27 14:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 16:32:49 +0000 (5 09:32 -0700)
treecdcd8d8e0dc95467952a58046135c92443fac5a1
parentfed392f6ec5c09647298b23519e366b3526c55ac
USB: xhci: Handle babbling endpoints correctly.

commit 83fbcdcca03013bb5af130d6d91eba11e3d3269e upstream.

The 0.95 xHCI spec says that non-control endpoints will be halted if a
babble is detected on a transfer.  The 0.96 xHCI spec says all types of
endpoints will be halted when a babble is detected.  Some hardware that
claims to be 0.95 compliant halts the control endpoint anyway.

When a babble is detected on a control endpoint, check the hardware's
output endpoint context to see if the endpoint is marked as halted.  If
the control endpoint is halted, a reset endpoint command must be issued
and the transfer ring dequeue pointer needs to be moved past the stopped
transfer.  Basically, we treat it as if the control endpoint had stalled.

Handle bulk babbling endpoints as if we got a completion event with a
stall completion code.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci-ring.c