aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 3cac2ff8b50a..59f38a5f2fe6 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1476,13 +1476,7 @@ static int xhci_check_streams_endpoint(struct xhci_hcd *xhci,
1476 ret = xhci_check_args(xhci_to_hcd(xhci), udev, ep, 1, __func__); 1476 ret = xhci_check_args(xhci_to_hcd(xhci), udev, ep, 1, __func__);
1477 if (ret <= 0) 1477 if (ret <= 0)
1478 return -EINVAL; 1478 return -EINVAL;
1479 if (!ep->ss_ep_comp) { 1479 if (ep->ss_ep_comp.bmAttributes == 0) {
1480 xhci_warn(xhci, "WARN: No SuperSpeed Endpoint Companion"
1481 " descriptor for ep 0x%x\n",
1482 ep->desc.bEndpointAddress);
1483 return -EINVAL;
1484 }
1485 if (ep->ss_ep_comp->desc.bmAttributes == 0) {
1486 xhci_warn(xhci, "WARN: SuperSpeed Endpoint Companion" 1480 xhci_warn(xhci, "WARN: SuperSpeed Endpoint Companion"
1487 " descriptor for ep 0x%x does not support streams\n", 1481 " descriptor for ep 0x%x does not support streams\n",
1488 ep->desc.bEndpointAddress); 1482 ep->desc.bEndpointAddress);
@@ -1540,7 +1534,6 @@ static int xhci_calculate_streams_and_bitmask(struct xhci_hcd *xhci,
1540 struct usb_host_endpoint **eps, unsigned int num_eps, 1534 struct usb_host_endpoint **eps, unsigned int num_eps,
1541 unsigned int *num_streams, u32 *changed_ep_bitmask) 1535 unsigned int *num_streams, u32 *changed_ep_bitmask)
1542{ 1536{
1543 struct usb_host_ss_ep_comp *ss_ep_comp;
1544 unsigned int max_streams; 1537 unsigned int max_streams;
1545 unsigned int endpoint_flag; 1538 unsigned int endpoint_flag;
1546 int i; 1539 int i;
@@ -1552,8 +1545,8 @@ static int xhci_calculate_streams_and_bitmask(struct xhci_hcd *xhci,
1552 if (ret < 0) 1545 if (ret < 0)
1553 return ret; 1546 return ret;
1554 1547
1555 ss_ep_comp = eps[i]->ss_ep_comp; 1548 max_streams = USB_SS_MAX_STREAMS(
1556 max_streams = USB_SS_MAX_STREAMS(ss_ep_comp->desc.bmAttributes); 1549 eps[i]->ss_ep_comp.bmAttributes);
1557 if (max_streams < (*num_streams - 1)) { 1550 if (max_streams < (*num_streams - 1)) {
1558 xhci_dbg(xhci, "Ep 0x%x only supports %u stream IDs.\n", 1551 xhci_dbg(xhci, "Ep 0x%x only supports %u stream IDs.\n",
1559 eps[i]->desc.bEndpointAddress, 1552 eps[i]->desc.bEndpointAddress,