Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xhci: Handle MaxPSASize == 0

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>

authored by

Hans de Goede and committed by
Sarah Sharp
f7920884 84c1e40f

+6
+6
drivers/usb/host/xhci.c
··· 3138 3138 xhci_dbg(xhci, "Driver wants %u stream IDs (including stream 0).\n", 3139 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 3147 config_cmd = xhci_alloc_command(xhci, true, true, mem_flags); 3142 3148 if (!config_cmd) { 3143 3149 xhci_dbg(xhci, "Could not allocate xHCI command structure.\n");