TencentOS-kernel/drivers/usb
Thinh Nguyen 5640cb8f65 usb: dwc3: gadget: Reclaim extra TRBs after request completion
[ Upstream commit 690e5c2dc29f8891fcfd30da67e0d5837c2c9df5 ]

An SG request may be partially completed (due to no available TRBs).
Don't reclaim extra TRBs and clear the needs_extra_trb flag until the
request is fully completed. Otherwise, the driver will reclaim the wrong
TRB.

Cc: stable@vger.kernel.org
Fixes: 1f512119a08c ("usb: dwc3: gadget: add remaining sg entries to ring")
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-16 16:40:33 +08:00
..
atm Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
c67x00 USB: c67x00: fix use after free in c67x00_giveback_urb 2021-03-16 16:32:07 +08:00
cdns3 usb: cdns3: gadget: suspicious implicit sign extension 2021-03-16 16:40:27 +08:00
chipidea usb: chipidea: core: add wakeup support for extcon 2021-03-16 16:32:08 +08:00
class usb: cdc-acm: fix cooldown mechanism 2021-03-16 16:40:02 +08:00
common Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
core USB: Add NO_LPM quirk for Kingston flash drive 2021-03-16 16:40:30 +08:00
dwc2 usb: dwc2: Fix INTR OUT transfers in DDMA mode. 2021-03-16 16:38:45 +08:00
dwc3 usb: dwc3: gadget: Reclaim extra TRBs after request completion 2021-03-16 16:40:33 +08:00
early USB: early: Handle AMD's spec-compliant identifiers, too 2021-03-16 16:26:55 +08:00
gadget usb: gadget: f_ncm: allow using NCM in SuperSpeed Plus gadgets. 2021-03-16 16:39:27 +08:00
host usb: host: fsl-mph-dr-of: check return of dma_set_mask() 2021-03-16 16:40:03 +08:00
image Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
isp1760 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
misc USB: adutux: fix debugging 2021-03-16 16:39:47 +08:00
mon Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mtu3 usb: mtu3: fix panic in mtu3_gadget_stop() 2021-03-16 16:40:30 +08:00
musb usb: musb: Fix runtime PM imbalance on error 2021-03-16 16:28:52 +08:00
phy usb: phy: twl6030-usb: Fix a resource leak in an error handling path in 'twl6030_usb_probe()' 2021-03-16 16:28:29 +08:00
renesas_usbhs usb: renesas_usbhs: getting residue from callback_result 2021-03-16 16:31:01 +08:00
roles Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
serial USB: serial: option: add Telit FN980 composition 0x1055 2021-03-16 16:40:29 +08:00
storage USB: UAS: fix disconnect by unplugging a hub 2021-03-16 16:36:19 +08:00
typec usb: typec: tcpm: reset hard_reset_count for any disconnect 2021-03-16 16:40:03 +08:00
usbip Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
usb-skeleton.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00