diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-09-19 19:27:26 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-09-25 18:19:34 -0400 |
commit | 80fab3b244a22e0ca539d2439bdda50e81e5666f (patch) | |
tree | 97fcf5110cd22e2ba6ff7776221192646915fc74 /drivers/usb/host/xhci-ring.c | |
parent | 457a73d346187c2cc5d599072f38676f18f130e0 (diff) |
xhci: Intel Panther Point BEI quirk.
When a device with an isochronous endpoint is behind a hub plugged into
the Intel Panther Point xHCI host controller, and the driver submits
multiple frames per URB, the xHCI driver will set the Block Event
Interrupt (BEI) flag on all but the last TD for the URB. This causes
the host controller to place an event on the event ring, but not send an
interrupt. When the last TD for the URB completes, BEI is cleared, and
we get an interrupt for the whole URB.
However, under a Panther Point xHCI host controller, if the parent hub
is unplugged when one or more events from transfers with BEI set are on
the event ring, a port status change event is placed on the event ring,
but no interrupt is generated. This means URBs stop completing, and the
USB device disconnect is not noticed. Something like a USB headset will
cause mplayer to hang when the device is disconnected.
If another transfer is sent (such as running `sudo lsusb -v`), the next
transfer event seems to "unstick" the event ring, the xHCI driver gets
an interrupt, and the disconnect is reported to the USB core.
The fix is not to use the BEI flag under the Panther Point xHCI host.
This will impact power consumption and system responsiveness, because
the xHCI driver will receive an interrupt for every frame in all
isochronous URBs instead of once per URB.
Intel chipset developers confirm that this bug will be hit if the BEI
flag is used on any endpoint, not just ones that are behind a hub.
This patch should be backported to kernels as old as 3.0, that contain
the commit 69e848c2090aebba5698a1620604c7dccb448684 "Intel xhci: Support
EHCI/xHCI port switching."
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index f270e70559bd..c6ebb176dc4f 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -3672,7 +3672,9 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, | |||
3672 | } else { | 3672 | } else { |
3673 | td->last_trb = ep_ring->enqueue; | 3673 | td->last_trb = ep_ring->enqueue; |
3674 | field |= TRB_IOC; | 3674 | field |= TRB_IOC; |
3675 | if (xhci->hci_version == 0x100) { | 3675 | if (xhci->hci_version == 0x100 && |
3676 | !(xhci->quirks & | ||
3677 | XHCI_AVOID_BEI)) { | ||
3676 | /* Set BEI bit except for the last td */ | 3678 | /* Set BEI bit except for the last td */ |
3677 | if (i < num_tds - 1) | 3679 | if (i < num_tds - 1) |
3678 | field |= TRB_BEI; | 3680 | field |= TRB_BEI; |