On Sun, Mar 15, 2015 at 3:54 PM, Alistair Grant <akgrant0710@xxxxxxxxx> wrote: > On Thu, Mar 12, 2015 at 8:14 PM, Alistair Grant <akgrant0710@xxxxxxxxx> wrote: >> On Thu, Mar 12, 2015 at 11:15 AM, Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx> wrote: >>> When a device with an isochronous endpoint is plugged into the Intel >>> 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 Intel xHCI host controllers, if the event ring is full >>> of events from transfers with BEI set, an "Event Ring is Full" event >>> will be posted to the last entry of the event ring, but no interrupt >>> is generated. Host will cease all transfer and command executions and >>> wait until software completes handling the pending events in the event >>> ring. That means xHC stops, but event of "event ring is full" is not >>> notified. As the result, the xHC looks like dead to user. >>> >>> This patch is to apply XHCI_AVOID_BEI quirk to Intel xHC devices. And >>> it should be backported to kernels as old as 3.0, that contains the >>> commit 69e848c2090a ("Intel xhci: Support EHCI/xHCI port switching."). >>> >>> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx> >>> Cc: stable@xxxxxxxxxxxxxxx >>> --- >>> drivers/usb/host/xhci-pci.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c >>> index fd53c9e..2af32e2 100644 >>> --- a/drivers/usb/host/xhci-pci.c >>> +++ b/drivers/usb/host/xhci-pci.c >>> @@ -115,6 +115,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) >>> if (pdev->vendor == PCI_VENDOR_ID_INTEL) { >>> xhci->quirks |= XHCI_LPM_SUPPORT; >>> xhci->quirks |= XHCI_INTEL_HOST; >>> + xhci->quirks |= XHCI_AVOID_BEI; >>> } >>> if (pdev->vendor == PCI_VENDOR_ID_INTEL && >>> pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) { >>> @@ -130,7 +131,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) >>> * PPT chipsets. >>> */ >>> xhci->quirks |= XHCI_SPURIOUS_REBOOT; >>> - xhci->quirks |= XHCI_AVOID_BEI; >>> } >>> if (pdev->vendor == PCI_VENDOR_ID_INTEL && >>> pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI) { >>> -- >>> 2.1.0 >>> >>> -- >> >> This works for me... >> >> Computer: Dell XPS13 9333 >> USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04) >> (prog-if 30 [XHCI]) >> Kernel: 3.19.1 >> USB Device: Hauppauge USB-Live2 >> >> Please let me know if I can help in any other way. >> >> Tested-by: Alistair Grant <akgrant0710@xxxxxxxxx> > > Just FYI... > > I was able to test this on a slightly older laptop that had both USB2 > and USB3 ports and can confirm that it also works there: > > 00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset > Family USB xHCI Host Controller (rev 04) It looks like I may have signed-off a little too soon. While the patch is working correctly if the Hauppauge Live2 is plugged in after the system has booted and settled down (my normal use case), it fails if the Live2 is plugged in while the system is booted up. Unplugging the Live2 after recording (which appears to succeed from the command line, but had no audio), executing lsusb just hangs. I've included what I think is the relevant portions of /var/log/syslog below. If you'd like the entire log file posted somewhere please let me know. Thanks, Alistair Mar 15 19:50:42 alistair-XPS13 kernel: [ 15.177240] Linux video capture interface: v2.00 Mar 15 19:50:42 alistair-XPS13 kernel: [ 15.221452] AVX2 version of gcm_enc/dec engaged. Mar 15 19:50:42 alistair-XPS13 kernel: [ 15.221456] AES CTR mode by8 optimization enabled Mar 15 19:50:42 alistair-XPS13 kernel: [ 15.257091] cx231xx 1-2:1.1: New device Hauppauge Hauppauge Device @ 480 Mbps (2040:c200) with 6 interfaces Mar 15 19:50:42 alistair-XPS13 kernel: [ 15.257790] cx231xx 1-2:1.1: can't change interface 3 alt no. to 3: Max. Pkt size = 0 Mar 15 19:50:42 alistair-XPS13 kernel: [ 15.259281] cx231xx 1-2:1.1: can't change interface 4 alt no. to 1: Max. Pkt size = 0 Mar 15 19:50:42 alistair-XPS13 kernel: [ 15.260533] cx231xx 1-2:1.1: Identified as Hauppauge USB Live 2 (card=9) Mar 15 19:50:42 alistair-XPS13 kernel: [ 15.260724] i2c i2c-10: Added multiplexed i2c bus 12 Mar 15 19:50:42 alistair-XPS13 kernel: [ 15.260766] i2c i2c-10: Added multiplexed i2c bus 13 ... Mar 15 19:50:42 alistair-XPS13 kernel: [ 15.452042] cx25840 9-0044: cx23102 A/V decoder found @ 0x88 (cx231xx #0-0) ... Mar 15 19:50:44 alistair-XPS13 kernel: [ 17.447893] cx25840 9-0044: loaded v4l-cx231xx-avcore-01.fw firmware (16382 bytes) Mar 15 19:50:44 alistair-XPS13 kernel: [ 17.480218] cx231xx 1-2:1.1: v4l2 driver version 0.0.3 Mar 15 19:50:45 alistair-XPS13 kernel: [ 17.569959] cx231xx 1-2:1.1: Registered video device video1 [v4l2] Mar 15 19:50:45 alistair-XPS13 kernel: [ 17.570035] cx231xx 1-2:1.1: Registered VBI device vbi0 Mar 15 19:50:45 alistair-XPS13 kernel: [ 17.570039] cx231xx 1-2:1.1: video EndPoint Addr 0x84, Alternate settings: 5 Mar 15 19:50:45 alistair-XPS13 kernel: [ 17.570042] cx231xx 1-2:1.1: VBI EndPoint Addr 0x85, Alternate settings: 2 Mar 15 19:50:45 alistair-XPS13 kernel: [ 17.570045] cx231xx 1-2:1.1: sliced CC EndPoint Addr 0x86, Alternate settings: 2 Mar 15 19:50:45 alistair-XPS13 kernel: [ 17.571225] usbcore: registered new interface driver cx231xx Mar 15 19:50:45 alistair-XPS13 kernel: [ 17.578681] cx231xx 1-2:1.1: audio EndPoint Addr 0x83, Alternate settings: 3 Mar 15 19:50:45 alistair-XPS13 kernel: [ 17.578687] cx231xx 1-2:1.1: Cx231xx Audio Extension initialized ... Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.350483] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.350491] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89400 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.350559] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.350567] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89410 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.350657] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 13 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.350660] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89420 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.350799] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.350803] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89430 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.350928] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.350933] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89440 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351051] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351054] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89450 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351175] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351178] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89460 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351300] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351303] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89470 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351437] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351440] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89480 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351560] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351563] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89490 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351686] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351690] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b894a0 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351811] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351814] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b894b0 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351955] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.351959] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b894c0 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352053] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352060] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b894e0 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352159] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 13 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352165] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b894f0 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352301] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352306] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89500 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352426] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352432] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89510 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352551] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352556] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89520 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352676] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352681] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89530 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352801] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352807] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89540 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352926] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.352931] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89550 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353051] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353056] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89560 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353176] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353181] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89570 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353301] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353306] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89580 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353426] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353431] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b89590 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353551] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353556] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b895a0 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353675] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353681] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b895b0 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353800] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 8 comp_code 1 Mar 15 19:53:19 alistair-XPS13 kernel: [ 172.353803] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000035b895c0 trb-start 00000001faa39190 trb-end 00000001faa39190 seg-start 00000001faa39000 seg-end 00000001faa393f0 ... Mar 15 19:56:05 alistair-XPS13 pulseaudio[3319]: [alsa-source-Cx231xx Audio] alsa-util.c: Got POLLNVAL from ALSA Mar 15 19:56:05 alistair-XPS13 pulseaudio[3319]: [alsa-source-Cx231xx Audio] alsa-util.c: Could not recover from POLLERR|POLLNVAL|POLLHUP with snd_pcm_prepare(): No such device Mar 15 19:56:05 alistair-XPS13 kernel: [ 337.898530] usb 1-2: USB disconnect, device number 2 Mar 15 19:56:14 alistair-XPS13 pulseaudio[3319]: [alsa-sink-ALC3661 Analog] asyncq.c: q overrun, queuing locally Mar 15 19:56:15 alistair-XPS13 pulseaudio[3319]: message repeated 10 times: [ [alsa-sink-ALC3661 Analog] asyncq.c: q overrun, queuing locally] Mar 15 19:56:19 alistair-XPS13 pulseaudio[3319]: [alsa-sink-HDMI 1] asyncq.c: q overrun, queuing locally Mar 15 19:56:24 alistair-XPS13 pulseaudio[3319]: [alsa-source-ALC3661 Analog] asyncq.c: q overrun, queuing locally Mar 15 19:56:25 alistair-XPS13 pulseaudio[3319]: [alsa-sink-ALC3661 Analog] asyncq.c: q overrun, queuing locally Mar 15 19:56:29 alistair-XPS13 pulseaudio[3319]: [alsa-source-ALC3661 Analog] asyncq.c: q overrun, queuing locally Mar 15 19:56:29 alistair-XPS13 pulseaudio[3319]: [alsa-sink-ALC3661 Analog] asyncq.c: q overrun, queuing locally Mar 15 19:56:34 alistair-XPS13 pulseaudio[3319]: [alsa-source-ALC3661 Analog] asyncq.c: q overrun, queuing locally Mar 15 19:56:34 alistair-XPS13 pulseaudio[3319]: [alsa-sink-ALC3661 Analog] asyncq.c: q overrun, queuing locally Mar 15 19:56:39 alistair-XPS13 pulseaudio[3319]: [alsa-source-ALC3661 Analog] asyncq.c: q overrun, queuing locally Mar 15 19:56:39 alistair-XPS13 pulseaudio[3319]: [alsa-sink-ALC3661 Analog] asyncq.c: q overrun, queuing locally Mar 15 19:56:44 alistair-XPS13 pulseaudio[3319]: [alsa-source-ALC3661 Analog] asyncq.c: q overrun, queuing locally Mar 15 19:56:50 alistair-XPS13 pulseaudio[3319]: [alsa-sink-HDMI 1] asyncq.c: q overrun, queuing locally -- -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html