Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ced2d2d1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: host: Flush hub workqueue before stopping controller"

parents 2b947618 9e40f5c3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2869,6 +2869,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_list_lock);
	usb_disconnect(&rhdev);		/* Sets rhdev to NULL */
	mutex_unlock(&usb_bus_list_lock);
+6 −0
Original line number Diff line number Diff line
@@ -606,6 +606,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.
+1 −1
Original line number Diff line number Diff line
@@ -474,7 +474,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);