]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: aspeed-vhub: Fix SETUP packets with OUT data phase
authorBenjamin Herrenschmidt <benh@linux.vnet.ibm.com>
Wed, 27 Jun 2018 23:01:54 +0000 (09:01 +1000)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 17 Jul 2018 07:12:51 +0000 (10:12 +0300)
commit3a99b4cad61ab7a53b9abf04411e412c3cd5d6fc
treed7a52c9fefa03d7f8d5f17fdf53e8c820a8f4325
parentb5b9cea82f4095033ee9fdbdc3eeb33ae74a57c7
usb: gadget: aspeed-vhub: Fix SETUP packets with OUT data phase

A couple of bugs in the driver are preventing SETUP packets
with an OUT data phase from working properly.

Interestingly those are incredibly rare (RNDIS typically
uses them and thus is broken without this fix).

The main problem was an incorrect register offset being
applied for arming RX on EP0. The other problem relates
to stalling such a packet before the data phase, in which
case we don't get an ACK cycle, and get the next SETUP
packet directly, so we shouldn't reject it.

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