]> Git Repo - linux.git/blobdiff - drivers/usb/host/xhci.c
Merge tag 'iommu-updates-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / drivers / usb / host / xhci.c
index 8eacd2ed412bf4925647056550bc74d9b75d69d2..005e65922608e9f0f72c3f06d26a9a436d1362f7 100644 (file)
@@ -169,7 +169,7 @@ int xhci_reset(struct xhci_hcd *xhci)
 {
        u32 command;
        u32 state;
-       int ret, i;
+       int ret;
 
        state = readl(&xhci->op_regs->status);
 
@@ -215,11 +215,12 @@ int xhci_reset(struct xhci_hcd *xhci)
        ret = xhci_handshake(&xhci->op_regs->status,
                        STS_CNR, 0, 10 * 1000 * 1000);
 
-       for (i = 0; i < 2; i++) {
-               xhci->bus_state[i].port_c_suspend = 0;
-               xhci->bus_state[i].suspended_ports = 0;
-               xhci->bus_state[i].resuming_ports = 0;
-       }
+       xhci->usb2_rhub.bus_state.port_c_suspend = 0;
+       xhci->usb2_rhub.bus_state.suspended_ports = 0;
+       xhci->usb2_rhub.bus_state.resuming_ports = 0;
+       xhci->usb3_rhub.bus_state.port_c_suspend = 0;
+       xhci->usb3_rhub.bus_state.suspended_ports = 0;
+       xhci->usb3_rhub.bus_state.resuming_ports = 0;
 
        return ret;
 }
@@ -1087,9 +1088,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
        /* Wait a bit if either of the roothubs need to settle from the
         * transition into bus suspend.
         */
-       if (time_before(jiffies, xhci->bus_state[0].next_statechange) ||
-                       time_before(jiffies,
-                               xhci->bus_state[1].next_statechange))
+
+       if (time_before(jiffies, xhci->usb2_rhub.bus_state.next_statechange) ||
+           time_before(jiffies, xhci->usb3_rhub.bus_state.next_statechange))
                msleep(100);
 
        set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
@@ -4388,8 +4389,7 @@ static int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
        struct xhci_hcd *xhci = hcd_to_xhci(hcd);
        int             portnum = udev->portnum - 1;
 
-       if (hcd->speed >= HCD_USB3 || !xhci->sw_lpm_support ||
-                       !udev->lpm_capable)
+       if (hcd->speed >= HCD_USB3 || !udev->lpm_capable)
                return 0;
 
        /* we only support lpm for non-hub device connected to root hub yet */
This page took 0.037127 seconds and 4 git commands to generate.