aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/pci-quirks.c
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2012-04-16 13:56:47 -0400
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2012-05-03 16:16:32 -0400
commit51c9e6c7732b67769c0a514d31f505e49fa82dd4 (patch)
treea1f97e55ac2657a7b1f02c3637f4e03ccac4a884 /drivers/usb/host/pci-quirks.c
parent9c745995ae5c4ff787f34a359de908facc11ee00 (diff)
xhci: Avoid dead ports when CONFIG_USB_XHCI_HCD=n
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 stable kernels as old as 3.0, that contain commit 69e848c2090aebba5698a1620604c7dccb448684 "Intel xhci: Support EHCI/xHCI port switching." Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reported-by: Eric Anholt <eric.anholt@intel.com> Reported-by: David Bein <d.bein@f5.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/usb/host/pci-quirks.c')
-rw-r--r--drivers/usb/host/pci-quirks.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 32dada8c8b4f..39b2612342fd 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -9,6 +9,7 @@
9 */ 9 */
10 10
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/kconfig.h>
12#include <linux/kernel.h> 13#include <linux/kernel.h>
13#include <linux/pci.h> 14#include <linux/pci.h>
14#include <linux/init.h> 15#include <linux/init.h>
@@ -742,6 +743,19 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev)
742{ 743{
743 u32 ports_available; 744 u32 ports_available;
744 745
746 /* Don't switchover the ports if the user hasn't compiled the xHCI
747 * driver. Otherwise they will see "dead" USB ports that don't power
748 * the devices.
749 */
750 if (!IS_ENABLED(CONFIG_USB_XHCI_HCD)) {
751 dev_warn(&xhci_pdev->dev,
752 "CONFIG_USB_XHCI_HCD is turned off, "
753 "defaulting to EHCI.\n");
754 dev_warn(&xhci_pdev->dev,
755 "USB 3.0 devices will work at USB 2.0 speeds.\n");
756 return;
757 }
758
745 ports_available = 0xffffffff; 759 ports_available = 0xffffffff;
746 /* Write USB3_PSSEN, the USB 3.0 Port SuperSpeed Enable 760 /* Write USB3_PSSEN, the USB 3.0 Port SuperSpeed Enable
747 * Register, to turn on SuperSpeed terminations for all 761 * Register, to turn on SuperSpeed terminations for all