]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: Fix handling ZLP
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Fri, 7 Aug 2020 02:46:29 +0000 (19:46 -0700)
committerFelipe Balbi <balbi@kernel.org>
Mon, 17 Aug 2020 12:22:02 +0000 (15:22 +0300)
commit4bdefba77ef4f067d58f05f70d1556b9333fad84
tree3251af367df0f5c66ce6e74a3026408a76e42601
parentc1d3522d068ce92e4ce33add6c5d7fffae7a03bf
usb: dwc3: gadget: Fix handling ZLP

The usb_request->zero doesn't apply for isoc. Also, if we prepare a
0-length (ZLP) TRB for the OUT direction, we need to prepare an extra
TRB to pad up to the MPS alignment. Use the same bounce buffer for the
ZLP TRB and the extra pad TRB.

Cc: <stable@vger.kernel.org> # v4.5+
Fixes: 8b382ac3ea93 ("usb: dwc3: simplify ZLP handling")
Fixes: c950500ef7a4 ("usb: dwc3: gadget: handle request->zero")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/dwc3/gadget.c