]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc2: gadget: don't overwrite DCTL register on NAKEFF interrupts
authorGregory Herrero <gregory.herrero@intel.com>
Mon, 7 Dec 2015 11:07:31 +0000 (12:07 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 22 Dec 2015 17:50:43 +0000 (11:50 -0600)
commit5af9e51f086267d4b7ebc9f31d023fa878f7c257
tree2182da09b455a27dc4c78b78127f6e6f73b1ef82
parentae1083dfa4b059552faf9c0c16845eee09c7a068
usb: dwc2: gadget: don't overwrite DCTL register on NAKEFF interrupts

When receiving GINTSTS_GINNAKEFF or GINTSTS_GOUTNAKEFF interrupt,
DCTL will be overwritten with DCTL_CGOUTNAK or DCTL_CGNPINNAK values.
Instead of overwriting it, write only needed bits.

It could cause an issue if GINTSTS_GINNAKEFF or GINTSTS_GOUTNAKEFF
interrupt is received after dwc2 disabled pullup by writing
DCTL_SFTDISCON bit.
Pullup will then be re-enabled whereas it should not.

Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/gadget.c