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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 8d7fcbbe6ad..c9e419f29b7 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -479,7 +479,8 @@ static bool compliance_mode_recovery_timer_quirk_check(void)
479 479
480 if (strstr(dmi_product_name, "Z420") || 480 if (strstr(dmi_product_name, "Z420") ||
481 strstr(dmi_product_name, "Z620") || 481 strstr(dmi_product_name, "Z620") ||
482 strstr(dmi_product_name, "Z820")) 482 strstr(dmi_product_name, "Z820") ||
483 strstr(dmi_product_name, "Z1"))
483 return true; 484 return true;
484 485
485 return false; 486 return false;
@@ -1626,7 +1627,6 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
1626 struct xhci_hcd *xhci; 1627 struct xhci_hcd *xhci;
1627 struct xhci_container_ctx *in_ctx, *out_ctx; 1628 struct xhci_container_ctx *in_ctx, *out_ctx;
1628 unsigned int ep_index; 1629 unsigned int ep_index;
1629 struct xhci_ep_ctx *ep_ctx;
1630 struct xhci_slot_ctx *slot_ctx; 1630 struct xhci_slot_ctx *slot_ctx;
1631 struct xhci_input_control_ctx *ctrl_ctx; 1631 struct xhci_input_control_ctx *ctrl_ctx;
1632 u32 added_ctxs; 1632 u32 added_ctxs;
@@ -1662,7 +1662,6 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
1662 out_ctx = virt_dev->out_ctx; 1662 out_ctx = virt_dev->out_ctx;
1663 ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx); 1663 ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx);
1664 ep_index = xhci_get_endpoint_index(&ep->desc); 1664 ep_index = xhci_get_endpoint_index(&ep->desc);
1665 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index);
1666 1665
1667 /* If this endpoint is already in use, and the upper layers are trying 1666 /* If this endpoint is already in use, and the upper layers are trying
1668 * to add it again without dropping it, reject the addition. 1667 * to add it again without dropping it, reject the addition.
@@ -1816,6 +1815,8 @@ static int xhci_evaluate_context_result(struct xhci_hcd *xhci,
1816 case COMP_EBADSLT: 1815 case COMP_EBADSLT:
1817 dev_warn(&udev->dev, "WARN: slot not enabled for" 1816 dev_warn(&udev->dev, "WARN: slot not enabled for"
1818 "evaluate context command.\n"); 1817 "evaluate context command.\n");
1818 ret = -EINVAL;
1819 break;
1819 case COMP_CTX_STATE: 1820 case COMP_CTX_STATE:
1820 dev_warn(&udev->dev, "WARN: invalid context state for " 1821 dev_warn(&udev->dev, "WARN: invalid context state for "
1821 "evaluate context command.\n"); 1822 "evaluate context command.\n");
@@ -4020,7 +4021,7 @@ int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
4020static unsigned long long xhci_service_interval_to_ns( 4021static unsigned long long xhci_service_interval_to_ns(
4021 struct usb_endpoint_descriptor *desc) 4022 struct usb_endpoint_descriptor *desc)
4022{ 4023{
4023 return (1 << (desc->bInterval - 1)) * 125 * 1000; 4024 return (1ULL << (desc->bInterval - 1)) * 125 * 1000;
4024} 4025}
4025 4026
4026static u16 xhci_get_timeout_no_hub_lpm(struct usb_device *udev, 4027static u16 xhci_get_timeout_no_hub_lpm(struct usb_device *udev,
@@ -4141,7 +4142,7 @@ static u16 xhci_calculate_intel_u2_timeout(struct usb_device *udev,
4141 (xhci_service_interval_to_ns(desc) > timeout_ns)) 4142 (xhci_service_interval_to_ns(desc) > timeout_ns))
4142 timeout_ns = xhci_service_interval_to_ns(desc); 4143 timeout_ns = xhci_service_interval_to_ns(desc);
4143 4144
4144 u2_del_ns = udev->bos->ss_cap->bU2DevExitLat * 1000; 4145 u2_del_ns = le16_to_cpu(udev->bos->ss_cap->bU2DevExitLat) * 1000ULL;
4145 if (u2_del_ns > timeout_ns) 4146 if (u2_del_ns > timeout_ns)
4146 timeout_ns = u2_del_ns; 4147 timeout_ns = u2_del_ns;
4147 4148