]> asedeno.scripts.mit.edu Git - linux.git/commit
usb: gadget: aspeed: Fix EP0 stall handling
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 26 Jul 2019 05:05:32 +0000 (15:05 +1000)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 12 Aug 2019 05:54:48 +0000 (08:54 +0300)
commit7e420cef9047dc945b019dc235ec91c792c30f2d
treed1524e8fde2aff74b0c498b3b7c5db45d50d67c7
parentd042c35eb86a8ef13c4b5180fd6953a51d9e1efc
usb: gadget: aspeed: Fix EP0 stall handling

When stalling EP0, we need to wait for an ACK interrupt,
otherwise we may get out of sync on the next setup packet
data phase. Also we need to ignore the direction when
processing that interrupt as the HW reports a potential
mismatch.

Implement this by adding a stall state to EP0. This fixes
some reported issues with mass storage and some hosts.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/aspeed-vhub/ep0.c
drivers/usb/gadget/udc/aspeed-vhub/vhub.h