summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2014-05-08 18:25:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-20 03:03:25 +0200
commitbe9820383b10984d77abe1abc26e2b7029e78e21 (patch)
treeeebfbf303c8c30ade253b1cbd418350aa53b96b1 /drivers/usb/host/xhci.c
parentxhci: Use pci_enable_msix_exact() instead of pci_enable_msix() (diff)
downloadlinux-be9820383b10984d77abe1abc26e2b7029e78e21.tar.xz
linux-be9820383b10984d77abe1abc26e2b7029e78e21.zip
xhci: Report max device limit when Enable Slot command fails.
xHCI host controllers may only support a limited number of device slot IDs, which is usually far less than the theoretical maximum number of devices (255) that the USB specifications advertise. This is frustrating to consumers that expect to be able to plug in a large number of devices. Add a print statement when the Enable Slot command fails to show how many devices the host supports. We can't change hardware manufacturer's design decisions, but hopefully we can save customers a little bit of time trying to debug why their host mysteriously fails when too many devices are plugged in. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reported-by: Amund Hov <Amund.Hov@silabs.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 88ec076d929d..92e1dda7246b 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3696,6 +3696,9 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
if (!xhci->slot_id) {
xhci_err(xhci, "Error while assigning device slot ID\n");
+ xhci_err(xhci, "Max number of devices this xHCI host supports is %u.\n",
+ HCS_MAX_SLOTS(
+ readl(&xhci->cap_regs->hcs_params1)));
return 0;
}