Loading drivers/usb/core/hcd.c +3 −0 Original line number Diff line number Diff line Loading @@ -2993,6 +2993,9 @@ void usb_remove_hcd(struct usb_hcd *hcd) cancel_work_sync(&hcd->wakeup_work); #endif /* handle any pending hub events before XHCI stops */ usb_flush_hub_wq(); mutex_lock(&usb_bus_idr_lock); usb_disconnect(&rhdev); /* Sets rhdev to NULL */ mutex_unlock(&usb_bus_idr_lock); Loading drivers/usb/core/hub.c +9 −2 Original line number Diff line number Diff line Loading @@ -638,6 +638,12 @@ void usb_kick_hub_wq(struct usb_device *hdev) kick_hub_wq(hub); } void usb_flush_hub_wq(void) { flush_workqueue(hub_wq); } EXPORT_SYMBOL(usb_flush_hub_wq); /* * Let the USB core know that a USB 3.0 device has sent a Function Wake Device * Notification, which indicates it had initiated remote wakeup. Loading Loading @@ -3430,7 +3436,8 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg) /* drive resume for USB_RESUME_TIMEOUT msec */ dev_dbg(&udev->dev, "usb %sresume\n", (PMSG_IS_AUTO(msg) ? "auto-" : "")); msleep(USB_RESUME_TIMEOUT); usleep_range(USB_RESUME_TIMEOUT * 1000, (USB_RESUME_TIMEOUT + 1) * 1000); /* Virtual root hubs can trigger on GET_PORT_STATUS to * stop resume signaling. Then finish the resume Loading @@ -3439,7 +3446,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg) status = hub_port_status(hub, port1, &portstatus, &portchange); /* TRSMRCY = 10 msec */ msleep(10); usleep_range(10000, 10500); } SuspendCleared: Loading drivers/usb/host/xhci-hub.c +1 −1 Original line number Diff line number Diff line Loading @@ -1356,7 +1356,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, xhci_set_link_state(xhci, port_array, wIndex, XDEV_RESUME); spin_unlock_irqrestore(&xhci->lock, flags); msleep(USB_RESUME_TIMEOUT); usleep_range(21000, 21500); spin_lock_irqsave(&xhci->lock, flags); xhci_set_link_state(xhci, port_array, wIndex, XDEV_U0); Loading include/linux/usb/hcd.h +1 −1 Original line number Diff line number Diff line Loading @@ -489,7 +489,7 @@ extern void usb_hc_died(struct usb_hcd *hcd); extern void usb_hcd_poll_rh_status(struct usb_hcd *hcd); extern void usb_wakeup_notification(struct usb_device *hdev, unsigned int portnum); extern void usb_flush_hub_wq(void); extern void usb_hcd_start_port_resume(struct usb_bus *bus, int portnum); extern void usb_hcd_end_port_resume(struct usb_bus *bus, int portnum); Loading Loading
drivers/usb/core/hcd.c +3 −0 Original line number Diff line number Diff line Loading @@ -2993,6 +2993,9 @@ void usb_remove_hcd(struct usb_hcd *hcd) cancel_work_sync(&hcd->wakeup_work); #endif /* handle any pending hub events before XHCI stops */ usb_flush_hub_wq(); mutex_lock(&usb_bus_idr_lock); usb_disconnect(&rhdev); /* Sets rhdev to NULL */ mutex_unlock(&usb_bus_idr_lock); Loading
drivers/usb/core/hub.c +9 −2 Original line number Diff line number Diff line Loading @@ -638,6 +638,12 @@ void usb_kick_hub_wq(struct usb_device *hdev) kick_hub_wq(hub); } void usb_flush_hub_wq(void) { flush_workqueue(hub_wq); } EXPORT_SYMBOL(usb_flush_hub_wq); /* * Let the USB core know that a USB 3.0 device has sent a Function Wake Device * Notification, which indicates it had initiated remote wakeup. Loading Loading @@ -3430,7 +3436,8 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg) /* drive resume for USB_RESUME_TIMEOUT msec */ dev_dbg(&udev->dev, "usb %sresume\n", (PMSG_IS_AUTO(msg) ? "auto-" : "")); msleep(USB_RESUME_TIMEOUT); usleep_range(USB_RESUME_TIMEOUT * 1000, (USB_RESUME_TIMEOUT + 1) * 1000); /* Virtual root hubs can trigger on GET_PORT_STATUS to * stop resume signaling. Then finish the resume Loading @@ -3439,7 +3446,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg) status = hub_port_status(hub, port1, &portstatus, &portchange); /* TRSMRCY = 10 msec */ msleep(10); usleep_range(10000, 10500); } SuspendCleared: Loading
drivers/usb/host/xhci-hub.c +1 −1 Original line number Diff line number Diff line Loading @@ -1356,7 +1356,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, xhci_set_link_state(xhci, port_array, wIndex, XDEV_RESUME); spin_unlock_irqrestore(&xhci->lock, flags); msleep(USB_RESUME_TIMEOUT); usleep_range(21000, 21500); spin_lock_irqsave(&xhci->lock, flags); xhci_set_link_state(xhci, port_array, wIndex, XDEV_U0); Loading
include/linux/usb/hcd.h +1 −1 Original line number Diff line number Diff line Loading @@ -489,7 +489,7 @@ extern void usb_hc_died(struct usb_hcd *hcd); extern void usb_hcd_poll_rh_status(struct usb_hcd *hcd); extern void usb_wakeup_notification(struct usb_device *hdev, unsigned int portnum); extern void usb_flush_hub_wq(void); extern void usb_hcd_start_port_resume(struct usb_bus *bus, int portnum); extern void usb_hcd_end_port_resume(struct usb_bus *bus, int portnum); Loading