aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-11-15 06:14:38 -0500
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2014-03-04 18:38:14 -0500
commitf7920884eb640bc642f3b4e56f5237d30a080eda (patch)
treedc1e764db7a17b33c630e804da3131cae2f3277e
parent84c1e40fd794a883431fc7688f653d3faa0265f0 (diff)
xhci: Handle MaxPSASize == 0
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
-rw-r--r--drivers/usb/host/xhci.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 6cb9c2235a0b..1db3c2794a49 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3138,6 +3138,12 @@ int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev,
3138 xhci_dbg(xhci, "Driver wants %u stream IDs (including stream 0).\n", 3138 xhci_dbg(xhci, "Driver wants %u stream IDs (including stream 0).\n",
3139 num_streams); 3139 num_streams);
3140 3140
3141 /* MaxPSASize value 0 (2 streams) means streams are not supported */
3142 if (HCC_MAX_PSA(xhci->hcc_params) < 4) {
3143 xhci_dbg(xhci, "xHCI controller does not support streams.\n");
3144 return -ENOSYS;
3145 }
3146
3141 config_cmd = xhci_alloc_command(xhci, true, true, mem_flags); 3147 config_cmd = xhci_alloc_command(xhci, true, true, mem_flags);
3142 if (!config_cmd) { 3148 if (!config_cmd) {
3143 xhci_dbg(xhci, "Could not allocate xHCI command structure.\n"); 3149 xhci_dbg(xhci, "Could not allocate xHCI command structure.\n");