diff options
author | Badhri Jagan Sridharan <badhri@google.com> | 2023-06-09 04:02:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-06-13 13:16:34 +0300 |
commit | 50966da807c81c5eb3bdfd392990fe0bba94d1ee (patch) | |
tree | b48096ecc3a9aaf7861eed4b2236f673ba34735b /scripts/gdb/linux/utils.py | |
parent | 92c9c3baad6b1fd584fbabeaa4756f9b77926cb5 (diff) | |
download | linux-50966da807c81c5eb3bdfd392990fe0bba94d1ee.tar.xz |
usb: gadget: udc: core: Offload usb_udc_vbus_handler processing
usb_udc_vbus_handler() can be invoked from interrupt context by irq
handlers of the gadget drivers, however, usb_udc_connect_control() has
to run in non-atomic context due to the following:
a. Some of the gadget driver implementations expect the ->pullup
callback to be invoked in non-atomic context.
b. usb_gadget_disconnect() acquires udc_lock which is a mutex.
Hence offload invocation of usb_udc_connect_control()
to workqueue.
UDC should not be pulled up unless gadget driver is bound. The new flag
"allow_connect" is now set by gadget_bind_driver() and cleared by
gadget_unbind_driver(). This prevents work item to pull up the gadget
even if queued when the gadget driver is already unbound.
Cc: stable@vger.kernel.org
Fixes: 1016fc0c096c ("USB: gadget: Fix obscure lockdep violation for udc_mutex")
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Message-ID: <20230609010227.978661-1-badhri@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions