Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7920884 authored by Hans de Goede's avatar Hans de Goede Committed by Sarah Sharp
Browse files

xhci: Handle MaxPSASize == 0

parent 84c1e40f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3138,6 +3138,12 @@ int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev,
	xhci_dbg(xhci, "Driver wants %u stream IDs (including stream 0).\n",
			num_streams);

	/* MaxPSASize value 0 (2 streams) means streams are not supported */
	if (HCC_MAX_PSA(xhci->hcc_params) < 4) {
		xhci_dbg(xhci, "xHCI controller does not support streams.\n");
		return -ENOSYS;
	}

	config_cmd = xhci_alloc_command(xhci, true, true, mem_flags);
	if (!config_cmd) {
		xhci_dbg(xhci, "Could not allocate xHCI command structure.\n");