Commit 66e4afc7 authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: pxa25x: fix disconnect reporting

when commit 6166c246 (usb: gadget: pxa25x_udc:
convert to udc_start/udc_stop) converted
this driver to udc_start/udc_stop, it failed
to consider the fact that stop_activity()
is called from disconnect interrupt.

Fix the problem so that gadget drivers know
about proper disconnect sequences.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent c390b036
...@@ -1303,6 +1303,10 @@ stop_activity(struct pxa25x_udc *dev, struct usb_gadget_driver *driver) ...@@ -1303,6 +1303,10 @@ stop_activity(struct pxa25x_udc *dev, struct usb_gadget_driver *driver)
} }
del_timer_sync(&dev->timer); del_timer_sync(&dev->timer);
/* report disconnect; the driver is already quiesced */
if (driver)
driver->disconnect(&dev->gadget);
/* re-init driver-visible data structures */ /* re-init driver-visible data structures */
udc_reinit(dev); udc_reinit(dev);
} }
......
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