diff mbox series

[v2,1/2] usb: gadget: composite: Clear "suspended" on reset/disconnect

Message ID 20190706004135.14955-1-benh@kernel.crashing.org (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] usb: gadget: composite: Clear "suspended" on reset/disconnect | expand

Commit Message

Benjamin Herrenschmidt July 6, 2019, 12:41 a.m. UTC
In some cases, one can get out of suspend with a reset or
a disconnect followed by a reconnect. Previously we would
leave a stale suspended flag set.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 drivers/usb/gadget/composite.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index b8a15840b4ff..dfcabadeed01 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1976,6 +1976,7 @@  void composite_disconnect(struct usb_gadget *gadget)
 	 * disconnect callbacks?
 	 */
 	spin_lock_irqsave(&cdev->lock, flags);
+	cdev->suspended = 0;
 	if (cdev->config)
 		reset_config(cdev);
 	if (cdev->driver->disconnect)