aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/xhci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index ad9ef056d36..afdc73ee84a 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3956,7 +3956,7 @@ static u16 xhci_calculate_intel_u1_timeout(struct usb_device *udev,
3956 /* Otherwise the calculation is the same as isoc eps */ 3956 /* Otherwise the calculation is the same as isoc eps */
3957 case USB_ENDPOINT_XFER_ISOC: 3957 case USB_ENDPOINT_XFER_ISOC:
3958 timeout_ns = xhci_service_interval_to_ns(desc); 3958 timeout_ns = xhci_service_interval_to_ns(desc);
3959 timeout_ns = DIV_ROUND_UP(timeout_ns * 105, 100); 3959 timeout_ns = DIV_ROUND_UP_ULL(timeout_ns * 105, 100);
3960 if (timeout_ns < udev->u1_params.sel * 2) 3960 if (timeout_ns < udev->u1_params.sel * 2)
3961 timeout_ns = udev->u1_params.sel * 2; 3961 timeout_ns = udev->u1_params.sel * 2;
3962 break; 3962 break;
@@ -3965,7 +3965,7 @@ static u16 xhci_calculate_intel_u1_timeout(struct usb_device *udev,
3965 } 3965 }
3966 3966
3967 /* The U1 timeout is encoded in 1us intervals. */ 3967 /* The U1 timeout is encoded in 1us intervals. */
3968 timeout_ns = DIV_ROUND_UP(timeout_ns, 1000); 3968 timeout_ns = DIV_ROUND_UP_ULL(timeout_ns, 1000);
3969 /* Don't return a timeout of zero, because that's USB3_LPM_DISABLED. */ 3969 /* Don't return a timeout of zero, because that's USB3_LPM_DISABLED. */
3970 if (timeout_ns == USB3_LPM_DISABLED) 3970 if (timeout_ns == USB3_LPM_DISABLED)
3971 timeout_ns++; 3971 timeout_ns++;
@@ -4004,7 +4004,7 @@ static u16 xhci_calculate_intel_u2_timeout(struct usb_device *udev,
4004 timeout_ns = u2_del_ns; 4004 timeout_ns = u2_del_ns;
4005 4005
4006 /* The U2 timeout is encoded in 256us intervals */ 4006 /* The U2 timeout is encoded in 256us intervals */
4007 timeout_ns = DIV_ROUND_UP(timeout_ns, 256 * 1000); 4007 timeout_ns = DIV_ROUND_UP_ULL(timeout_ns, 256 * 1000);
4008 /* If the necessary timeout value is bigger than what we can set in the 4008 /* If the necessary timeout value is bigger than what we can set in the
4009 * USB 3.0 hub, we have to disable hub-initiated U2. 4009 * USB 3.0 hub, we have to disable hub-initiated U2.
4010 */ 4010 */