+ if (need_usb2_u3_exit) {
+ spin_unlock_irqrestore(&xhci->lock, flags);
+ msleep(20);
+ spin_lock_irqsave(&xhci->lock, flags);
+ }
+
+ port_index = max_ports;
+ while (port_index--) {
+ if (!(port_was_suspended & BIT(port_index)))
+ continue;
+ /* Clear PLC to poll it later after XDEV_U0 */
+ xhci_test_and_clear_bit(xhci, port_array, port_index, PORT_PLC);
+ xhci_set_link_state(xhci, port_array, port_index, XDEV_U0);
+ }
+
+ port_index = max_ports;
+ while (port_index--) {
+ if (!(port_was_suspended & BIT(port_index)))
+ continue;
+ /* Poll and Clear PLC */
+ sret = xhci_handshake(port_array[port_index], PORT_PLC,
+ PORT_PLC, 10 * 1000);
+ if (sret)
+ xhci_warn(xhci, "port %d resume PLC timeout\n",
+ port_index);
+ xhci_test_and_clear_bit(xhci, port_array, port_index, PORT_PLC);
+ slot_id = xhci_find_slot_id_by_port(hcd, xhci, port_index + 1);
+ if (slot_id)
+ xhci_ring_device(xhci, slot_id);
+ }
+