usb: dwc2: gadget: For DDMA parse setup only after SetUp interrupt
authorVahram Aharonyan <vahrama@synopsys.com>
Tue, 15 Nov 2016 03:16:48 +0000 (19:16 -0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 18 Nov 2016 11:54:48 +0000 (13:54 +0200)
commitf0afdb424162c896e534a70cac858ccb7a516bad
tree3ac2cf1b6f09dcca0b2c54cd1ffb6e219ba34174
parent95d2b0370d3ce21796b98b41d166f6524e3610c6
usb: dwc2: gadget: For DDMA parse setup only after SetUp interrupt

Tests with various hosts show that depend on time difference between
host sending SETUP packet and IN/OUT token SW could get Xfercomplete
interrupt without SetUp interrupt. On the other hand, SW should parse
received SETUP packet only after ensuring that Host has moved to either
Data or Status stage of control transfer.

For this purpose added checking in the dwc2_hsotg_epint() function to
not handle xfercomplete and postpone SETUP packet analysis till SW's
getting of setup phase done interrupt.

Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c