From: Benjamin Herrenschmidt Date: Fri, 26 Jul 2019 04:59:03 +0000 (+1000) Subject: usb: gadget: composite: Clear "suspended" on reset/disconnect X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e95debe397986f68d38c6075b7ef89bf81316b5b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git usb: gadget: composite: Clear "suspended" on reset/disconnect [ Upstream commit 602fda17c7356bb7ae98467d93549057481d11dd ] 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 Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index b805962f5154..75c42393b64b 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -2008,6 +2008,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)