Commit d8bc3bf8 authored by Lukas Wunner's avatar Lukas Wunner Committed by Greg Kroah-Hartman

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: default avatarLukas Wunner <lukas@wunner.de>
Acked-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
Acked-by: default avatarFelipe Balbi <balbi@kernel.org>
Link: https://lore.kernel.org/r/77c07f00a6a9d94323c4a060a3c72817b0703b97.1574244795.git.lukas@wunner.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d710562e
......@@ -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);
}
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment