usb: gadget: function: u_ether: don't starve tx request queue
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 4 Oct 2016 12:14:43 +0000 (15:14 +0300)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:14:38 +0000 (13:14 +0000)
commitaabb786654ec7940361841825dc3f5993cb85095
treef97fefae069d6e9796c7e962d671c738fb68ce68
parentd3bfd9aec549f89e1a4668aaa27847d17be37066
usb: gadget: function: u_ether: don't starve tx request queue

commit 6c83f77278f17a7679001027e9231291c20f0d8a upstream.

If we don't guarantee that we will always get an
interrupt at least when we're queueing our very last
request, we could fall into situation where we queue
every request with 'no_interrupt' set. This will
cause the link to get stuck.

The behavior above has been triggered with g_ether
and dwc3.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/usb/gadget/u_ether.c