lkml.org 
[lkml]   [2012]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 38/59] usb: gadget: pch_udc: Fix disconnect issue
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Tomoya MORINAGA <tomoya.rohm@gmail.com>

    commit c50a3bff0edb0acd49d8033a12ea4668e09a31ad upstream.

    ISSUE:
    When the driver notifies a gadget of a disconnect event, a system
    rarely freezes.

    CAUSE:
    When the driver calls dev->driver->disconnect(), it is not calling
    spin_unlock().

    Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
    Signed-off-by: Felipe Balbi <balbi@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/usb/gadget/pch_udc.c | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    --- a/drivers/usb/gadget/pch_udc.c
    +++ b/drivers/usb/gadget/pch_udc.c
    @@ -2338,8 +2338,11 @@ static void pch_udc_svc_ur_interrupt(str
    /* Complete request queue */
    empty_req_queue(ep);
    }
    - if (dev->driver && dev->driver->disconnect)
    + if (dev->driver && dev->driver->disconnect) {
    + spin_unlock(&dev->lock);
    dev->driver->disconnect(&dev->gadget);
    + spin_lock(&dev->lock);
    + }
    }

    /**



    \
     
     \ /
      Last update: 2012-04-19 23:45    [W:4.031 / U:0.256 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site