summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorTomoya MORINAGA <tomoya.rohm@gmail.com>2012-01-12 11:27:05 +0900
committerFelipe Balbi <balbi@ti.com>2012-01-24 11:34:02 +0200
commitc50a3bff0edb0acd49d8033a12ea4668e09a31ad (patch)
tree9c884d460e64f4ec9996e7ce5df7dd6423a93e8b /drivers/usb
parent294f78ec493e69b55bcba566d4fe264d041aba8d (diff)
downloadlinux-c50a3bff0edb0acd49d8033a12ea4668e09a31ad.tar.bz2
usb: gadget: pch_udc: Fix disconnect issue
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/pch_udc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c
index a3fcaae4bc2a..6a44c921d13c 100644
--- a/drivers/usb/gadget/pch_udc.c
+++ b/drivers/usb/gadget/pch_udc.c
@@ -2335,8 +2335,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);
+ }
}
/**