summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2019-07-26 14:59:03 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-06 10:23:19 +0200
commit3f1b93b5a45cb6b6757f88f0029b6e59a1c72a4f (patch)
tree3e0e7d7e26eaf2d1e70922b3fdd4af11db242bc7
parent4ab6b15a00ca56ecc1ce372478916a611d369151 (diff)
downloadlinux-stable-3f1b93b5a45cb6b6757f88f0029b6e59a1c72a4f.tar.gz
linux-stable-3f1b93b5a45cb6b6757f88f0029b6e59a1c72a4f.tar.bz2
linux-stable-3f1b93b5a45cb6b6757f88f0029b6e59a1c72a4f.zip
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 <benh@kernel.crashing.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/usb/gadget/composite.c1
1 files changed, 1 insertions, 0 deletions
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)