Re: [PATCH 3.0-stable] xhci: Avoid dead ports when CONFIG_USB_XHCI_HCD=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 08, 2012 at 03:47:59PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> On 08-06-2012 2:49, Sarah Sharp wrote:
> 
> >If the user chooses to say "no" to CONFIG_USB_XHCI_HCD on a system
> >with an Intel Panther Point chipset, the PCI quirks code or the EHCI
> >driver will switch the ports over to the xHCI host, but the xHCI driver
> >will never load.  The ports will be powered off and seem "dead" to the
> >user.
> 
> >Fix this by only switching the ports over if CONFIG_USB_XHCI_HCD is
> >either compiled in, or compiled as a module.
> 
> >This patch should be backported to the 3.0 stable kernel, since it
> >contains the commit 69e848c2090aebba5698a1620604c7dccb448684 "Intel
> >xhci: Support EHCI/xHCI port switching."
> 
> >Signed-off-by: Sarah Sharp<sarah.a.sharp@xxxxxxxxxxxxxxx>
> >Reported-by: Eric Anholt<eric.anholt@xxxxxxxxx>
> >Reported-by: David Bein<d.bein@xxxxxx>
> >Cc: stable@xxxxxxxxxxxxxxx
> >---
> 
> >Hi Greg,
> 
> >This patch should build against the 3.0-stable branch.  Please queue it
> >for 3.0.
> 
> >Thanks,
> >Sarah Sharp
> 
> 
> >  drivers/usb/host/pci-quirks.c |   15 +++++++++++++++
> >  1 files changed, 15 insertions(+), 0 deletions(-)
> 
> >diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
> >index 0757b19..d0cf708 100644
> >--- a/drivers/usb/host/pci-quirks.c
> >+++ b/drivers/usb/host/pci-quirks.c
> >@@ -757,6 +757,7 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev)
> >  {
> >  	u32		ports_available;
> >
> >+#if defined(CONFIG_USB_XHCI_HCD) || defined(CONFIG_USB_XHCI_HCD_MODULE)
> 
>    Strange. You correctly avoid using IS_ENABLED() here...
> 
> >  	ports_available = 0xffffffff;
> >  	/* Write USB3_PSSEN, the USB 3.0 Port SuperSpeed Enable
> >  	 * Register, to turn on SuperSpeed terminations for all
> >@@ -782,6 +783,20 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev)
> >  			&ports_available);
> >  	dev_dbg(&xhci_pdev->dev, "USB 2.0 ports that are now switched over "
> >  			"to xHCI: 0x%x\n", ports_available);
> >+#else
> >+	/* Don't switchover the ports if the user hasn't compiled the xHCI
> >+	 * driver.  Otherwise they will see "dead" USB ports that don't power
> >+	 * the devices.
> >+	 */
> >+	if (!IS_ENABLED(CONFIG_USB_XHCI_HCD)) {
> 
>    ... but not here.

Ah, that's probably because I had CONFIG_USB_XHCI_HCD=y at compile time,
which made this section be excluded.  Thanks for catching that, I'll
rework the patch to avoid IS_ENABLED() in that second section.

Sarah Sharp
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux