]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: Don't modify GEVNTCOUNT in pullup()
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Fri, 22 Apr 2022 02:22:44 +0000 (19:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 May 2022 20:03:23 +0000 (22:03 +0200)
commit6c6acae5539838a2ca7cf9714a9c46817dbadf13
treea18a757e53b7df7bac637669e2dbacc2639ba2a9
parent5eae393b2e346848e5d7292f7dde73d6c0426555
usb: dwc3: gadget: Don't modify GEVNTCOUNT in pullup()

If the GEVNTCOUNT indicates events in the event buffer, the driver needs
to acknowledge them before the controller can halt. Simply let the
interrupt handler acknowledges the remaining event generated by the
controller while polling for DSTS.DEVCTLHLT. This avoids disabling irq
and taking care of race condition between the interrupt handlers and
pullup().

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/ea306ec93c41ccafbdb5d16404ff3b6eca299613.1650593829.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c