lkml.org 
[lkml]   [2020]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 42/48] usb: renesas_usbhs: gadget: fix spin_lock_init() for &uep->lock
    Date
    From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

    commit 14a8d4bfc2102f85ce097563d151370c91c1898a upstream.

    This patch fixes an issue that the spin_lock_init() is not called
    for almost all pipes. Otherwise, the lockdep output the following
    message when we connect a usb cable using g_ncm:

    INFO: trying to register non-static key.
    the code is fine but needs lockdep annotation.
    turning off the locking correctness validator.

    Reported-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
    Fixes: b8b9c974afee ("usb: renesas_usbhs: gadget: disable all eps when the driver stops")
    Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Tested-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
    Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/usb/renesas_usbhs/mod_gadget.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/usb/renesas_usbhs/mod_gadget.c
    +++ b/drivers/usb/renesas_usbhs/mod_gadget.c
    @@ -1103,7 +1103,6 @@ int usbhs_mod_gadget_probe(struct usbhs_
    ret = -ENOMEM;
    goto usbhs_mod_gadget_probe_err_gpriv;
    }
    - spin_lock_init(&uep->lock);

    gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED);
    dev_info(dev, "%stransceiver found\n",
    @@ -1151,6 +1150,7 @@ int usbhs_mod_gadget_probe(struct usbhs_
    uep->ep.name = uep->ep_name;
    uep->ep.ops = &usbhsg_ep_ops;
    INIT_LIST_HEAD(&uep->ep.ep_list);
    + spin_lock_init(&uep->lock);

    /* init DCP */
    if (usbhsg_is_dcp(uep)) {

    \
     
     \ /
      Last update: 2020-06-01 19:57    [W:4.921 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site