]> git.karo-electronics.de Git - linux-beck.git/commit
usb: dwc3: gadget: cope with XferNotReady before usb_ep_queue()
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 21 Oct 2016 10:07:09 +0000 (13:07 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 3 Nov 2016 08:38:40 +0000 (10:38 +0200)
commit6cb2e4e3de10893f38dbf3923a9cc50c76548a89
treed62c8961066bc0feb8462616bb90176fd3558661
parent76a638f8ac0dd1dadee8f87acff36174d473b7c1
usb: dwc3: gadget: cope with XferNotReady before usb_ep_queue()

If XferNotReady comes before usb_ep_queue() we will
set our PENDING request flag and wait for a
request. However, originally, we were assuming
usb_ep_queue() would always happen before our first
XferNotReady and that causes a corner case where we
could try to issue ENDTRANSFER command before
STARTTRANSFER.

Let's fix that by tracking endpoints which have been
started.

Reported-by: Janusz Dziedzic <januszx.dziedzic@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c