kernel_samsung_a53x/drivers/usb
yuan linyu 9b430b0863 usb: f_mass_storage: forbid async queue when shutdown happen
commit b2d2d7ea0dd09802cf5a0545bf54d8ad8987d20c upstream.

When write UDC to empty and unbind gadget driver from gadget device, it is
possible that there are many queue failures for mass storage function.

The root cause is mass storage main thread alaways try to queue request to
receive a command from host if running flag is on, on platform like dwc3,
if pull down called, it will not queue request again and return
-ESHUTDOWN, but it not affect running flag of mass storage function.

Check return code from mass storage function and clear running flag if it
is -ESHUTDOWN, also indicate start in/out transfer failure to break loops.

Cc: stable <stable@kernel.org>
Signed-off-by: yuan linyu <yuanlinyu@hihonor.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20240123034829.3848409-1-yuanlinyu@hihonor.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 12:13:29 +01:00
..
atm
c67x00
cdns3 usb: cdns3: Fix uvc fail when DMA cross 4k boundery since sg enabled 2024-11-18 12:12:54 +01:00
chipidea usb: chipidea: wait controller resume finished for wakeup irq 2024-11-18 12:12:46 +01:00
class usb: cdc-acm: return correct error code on unsupported break 2024-11-18 12:12:50 +01:00
common
core USB: hub: check for alternate port before enabling A_ALT_HNP_SUPPORT 2024-11-18 12:13:29 +01:00
dwc2
dwc3 usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart 2024-11-18 12:12:46 +01:00
early
gadget usb: f_mass_storage: forbid async queue when shutdown happen 2024-11-18 12:13:29 +01:00
host usb: host: xhci-plat: Add support for XHCI_SG_TRB_CACHE_SIZE_QUIRK 2024-11-18 12:13:26 +01:00
image
isp1760
misc
mon usb: mon: Fix atomicity violation in mon_bin_vma_fault 2024-11-18 12:12:47 +01:00
mtu3
musb
notify
notify_lsi
phy usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host() 2024-11-18 12:12:46 +01:00
renesas_usbhs
roles
serial USB: serial: cp210x: add ID for IMST iM871A-USB 2024-11-18 12:13:26 +01:00
storage
typec usb: ucsi_acpi: Fix command completion handling 2024-11-18 12:13:29 +01:00
usbip
Kconfig
Kconfig.variant1
Makefile
Makefile.variant1
usb-skeleton.c