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)
committerSasha Levin <alexander.levin@verizon.com>
Tue, 1 Nov 2016 19:17:22 +0000 (15:17 -0400)
commit517052446f36f78b13502ccafc8884b6339643d2
tree710b4dbb93e8513fc0a1089fcc216f046ec5a846
parent66f38bf99faa0b30d7486906738da66b56fb7d80
usb: gadget: function: u_ether: don't starve tx request queue

[ Upstream commit 6c83f77278f17a7679001027e9231291c20f0d8a ]

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.

Cc: <stable@vger.kernel.org>
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/usb/gadget/function/u_ether.c