summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJack Pham <jackp@codeaurora.org>2015-10-21 12:50:15 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:06:57 -0700
commit869c733233e0f449e82764b676f2172bf68bba09 (patch)
tree7b075ad7714068e3794761f47d3b03407de4a038 /include/linux
parenta43ebbb8622334dd7605d7f9ae69f91f8cfcd6a9 (diff)
usb: dwc3: Disable ep0 and interrupts when clearing run/stop
In dwc3_gadget_run_stop() when clearing the run/stop bit, ensure that IRQs are masked and the ep0 in and out endpoints are disabled. In case pullups are removed while a control transfer is in progress, this makes sure that the control endpoints are properly cleaned up. If and when run/stop is set again, the function already re-enables the IRQ and ep0 when calling dwc3_gadget_restart(). While at it, memset() the event buffers to clear stale contents when reinitializing them in dwc3_event_buffers_setup(). Also, since calling dwc3_gadget_disable_irq() only masks the interrupts at the controller layer, it might not catch instances where an IRQ itself may have already been asserted but does not arrive at the handler until after the pullups are removed. Add a check to dwc3_interrupt() to catch this case as well. Change-Id: Ie58979fe4b229240231760652189338ec5343a2d Signed-off-by: Jack Pham <jackp@codeaurora.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions