dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Tomoya MORINAGA 2012-01-12 11:27:05 +09:00 committed by Felipe Balbi
parent 294f78ec49
commit c50a3bff0e
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}
}
/**