usb: dwc3: gadget: fix for short pkts during chained xfers
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 10 Aug 2016 08:13:26 +0000 (11:13 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 10 Aug 2016 11:15:57 +0000 (14:15 +0300)
commite5b36ae2f851024d43c76e51f395d32ce8d769ce
tree660467f5abe4041ce5ff5a3a897fb6ad124d9270
parentc7de573471832dff7d31f0c13b0f143d6f017799
usb: dwc3: gadget: fix for short pkts during chained xfers

DWC3 has one interesting peculiarity with chained
transfers. If we setup N chained transfers and we
get a short packet before processing all N TRBs,
DWC3 will (conditionally) issue a XferComplete or
XferInProgress event and retire all TRBs from the
one which got a short packet to the last without
clearing their HWO bits.

This means SW must clear HWO bit manually, which
this patch is doing.

Cc: <stable@vger.kernel.org>
Cc: Brian E Rogers <brian.e.rogers@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c