lkml.org 
[lkml]   [2019]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 4.19 18/27] usb: gadget: composite: Clear "suspended" on reset/disconnect
    Date
    From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

    [ 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>
    ---
    drivers/usb/gadget/composite.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
    index b8a15840b4ffd..dfcabadeed01b 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)
    --
    2.20.1
    \
     
     \ /
      Last update: 2019-08-20 15:56    [W:2.309 / U:0.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site