lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 15 Mar 2015 15:54:44 +0100
From:	Alistair Grant <akgrant0710@...il.com>
To:	Lu Baolu <baolu.lu@...ux.intel.com>,
	Mathias Nyman <mathias.nyman@...el.com>
Cc:	Devin Heitmueller <dheitmueller@...nellabs.com>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel
 xHCI controllers

On Thu, Mar 12, 2015 at 8:14 PM, Alistair Grant <akgrant0710@...il.com> wrote:
> On Thu, Mar 12, 2015 at 11:15 AM, Lu Baolu <baolu.lu@...ux.intel.com> 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@...ux.intel.com>
>> Cc: stable@...r.kernel.org
>> ---
>>  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@...il.com>

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)

Thanks,
Alistair
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ