diff options
author | Lukas Wunner <lukas@wunner.de> | 2019-11-20 11:15:15 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-15 14:43:12 +0100 |
commit | d8bc3bf8deede6d9c32f97b6a256264609ce2baa (patch) | |
tree | f19eda9e54daa4d69f70362d893f769eb58aacc3 /drivers/usb/dwc2 | |
parent | usb: gadget: f_ecm: Use atomic_t to track in-flight request (diff) | |
download | linux-d8bc3bf8deede6d9c32f97b6a256264609ce2baa.tar.xz linux-d8bc3bf8deede6d9c32f97b6a256264609ce2baa.zip |
usb: dwc2: Drop unlock/lock upon queueing a work item
The original dwc_otg driver used a DWC_WORKQ_SCHEDULE() wrapper to queue
work items. Because that wrapper acquired the driver's global spinlock,
an unlock/lock dance was necessary whenever a work item was queued up
while the global spinlock was already held.
The dwc2 driver dropped DWC_WORKQ_SCHEDULE() in favor of a direct call
to queue_work(), but retained the (now gratuitous) unlock/lock dance in
dwc2_handle_conn_id_status_change_intr(). Drop it.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Acked-by: Felipe Balbi <balbi@kernel.org>
Link: https://lore.kernel.org/r/77c07f00a6a9d94323c4a060a3c72817b0703b97.1574244795.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/core_intr.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c index 6af6add3d4c0..876ff31261d5 100644 --- a/drivers/usb/dwc2/core_intr.c +++ b/drivers/usb/dwc2/core_intr.c @@ -288,14 +288,9 @@ static void dwc2_handle_conn_id_status_change_intr(struct dwc2_hsotg *hsotg) /* * Need to schedule a work, as there are possible DELAY function calls. - * Release lock before scheduling workq as it holds spinlock during - * scheduling. */ - if (hsotg->wq_otg) { - spin_unlock(&hsotg->lock); + if (hsotg->wq_otg) queue_work(hsotg->wq_otg, &hsotg->wf_otg); - spin_lock(&hsotg->lock); - } } /** |