]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: Properly initialize LINK TRB
authorJack Pham <jackp@codeaurora.org>
Tue, 21 Oct 2014 23:31:10 +0000 (16:31 -0700)
committerFelipe Balbi <balbi@ti.com>
Thu, 23 Oct 2014 18:57:24 +0000 (13:57 -0500)
commitc77d83922cc426b56e7c8b106c0b9540a61ad038
tree9d12eba3924c789e1b10c9ff2039ca9198f0df7c
parent7b2a4bf31ace10e7a785ff68ecc08464dddeb966
usb: dwc3: gadget: Properly initialize LINK TRB

On ISOC endpoints the last trb_pool entry used as a
LINK TRB is not getting zeroed out correctly due to
memset being called incorrectly and in the wrong place.
If pool allocated from DMA was not zero-initialized
to begin with this will result in the size and ctrl
values being random garbage. Call memset correctly after
assignment of the trb_link pointer.

Fixes: 4b9c2cded7 ("usb: dwc3: convert TRBs into bitshifts")
Cc: <stable@vger.kernel.org> # v3.4+
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c