mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 09:41:54 +09:00
usb: gadget: pch_udc: Fix disconnect issue
commit c50a3bff0e upstream.
ISSUE:
When the driver notifies a gadget of a disconnect event, a system
rarely freezes.
CAUSE:
When the driver calls dev->driver->disconnect(), it is not calling
spin_unlock().
Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a1fdbba66d
commit
21c7c5809c
@@ -2338,8 +2338,11 @@ static void pch_udc_svc_ur_interrupt(struct pch_udc_dev *dev)
|
||||
/* Complete request queue */
|
||||
empty_req_queue(ep);
|
||||
}
|
||||
if (dev->driver && dev->driver->disconnect)
|
||||
if (dev->driver && dev->driver->disconnect) {
|
||||
spin_unlock(&dev->lock);
|
||||
dev->driver->disconnect(&dev->gadget);
|
||||
spin_lock(&dev->lock);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user