diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2010-11-16 18:58:52 -0500 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2010-11-19 19:23:31 -0500 |
commit | 6dd0a3a7e0793dbeae1b951f091025d8cf896cb4 (patch) | |
tree | 3598fdb54900c51e4f28a2cf33ad479cc5ce5407 | |
parent | da6699ce4a889c3795624ccdcfe7181cc89f18e8 (diff) |
xhci: Don't let the USB core disable SuperSpeed ports.
Disabling SuperSpeed ports is a Very Bad Thing (TM). It disables
SuperSpeed terminations, which means that devices will never connect at
SuperSpeed on that port. For USB 2.0/1.1 ports, disabling the port meant
that the USB core could always get a connect status change later. That's
not true with USB 3.0 ports.
Do not let the USB core disable SuperSpeed ports. We can't rely on the
device speed in the port status registers, since that isn't valid until
there's a USB device connected to the port. Instead, we use the port
speed array that's created from the Extended Capabilities registers.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: Don Zickus <dzickus@redhat.com>
Cc: stable@kernel.org
-rw-r--r-- | drivers/usb/host/xhci-hub.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index fef5a1f9d483..5d963e350494 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -229,6 +229,13 @@ void xhci_ring_device(struct xhci_hcd *xhci, int slot_id) | |||
229 | static void xhci_disable_port(struct xhci_hcd *xhci, u16 wIndex, | 229 | static void xhci_disable_port(struct xhci_hcd *xhci, u16 wIndex, |
230 | u32 __iomem *addr, u32 port_status) | 230 | u32 __iomem *addr, u32 port_status) |
231 | { | 231 | { |
232 | /* Don't allow the USB core to disable SuperSpeed ports. */ | ||
233 | if (xhci->port_array[wIndex] == 0x03) { | ||
234 | xhci_dbg(xhci, "Ignoring request to disable " | ||
235 | "SuperSpeed port.\n"); | ||
236 | return; | ||
237 | } | ||
238 | |||
232 | /* Write 1 to disable the port */ | 239 | /* Write 1 to disable the port */ |
233 | xhci_writel(xhci, port_status | PORT_PE, addr); | 240 | xhci_writel(xhci, port_status | PORT_PE, addr); |
234 | port_status = xhci_readl(xhci, addr); | 241 | port_status = xhci_readl(xhci, addr); |