mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
usb: gadget: cdev: Requeue the request outside spinlock
'Commit I87015f00267af ("usb: gadget: cdev: Requeue the request in
cser_resume if start_rx fails")' is requeuing the request in if
start_rx fails as dut is in suspend mode. This needs to done outside
of spinlock as usb_cser_start_rx will again acquire the port_lock to
queue the request causing a deadlock condition.
Fix this by requeuing the request outside the spinlock.
Change-Id: Ifa1cdb338d6a7e6a2d98ced55c4dbca9caf6ba0e
Signed-off-by: Pratham Pratap <quic_ppratap@quicinc.com>
This commit is contained in:
parent
d50888146d
commit
73d3217026
1 changed files with 2 additions and 0 deletions
|
|
@ -573,7 +573,9 @@ static void usb_cser_resume(struct usb_function *f)
|
|||
if (port->setup_pending) {
|
||||
pr_info("%s: start_rx called due to rx_out error.\n", __func__);
|
||||
port->setup_pending = false;
|
||||
spin_unlock_irqrestore(&port->port_lock, flags);
|
||||
usb_cser_start_rx(port);
|
||||
spin_lock_irqsave(&port->port_lock, flags);
|
||||
}
|
||||
in = port->port_usb.in;
|
||||
/* process any pending requests */
|
||||
|
|
|
|||
Loading…
Reference in a new issue