WSL2-Linux-Kernel/drivers/usb
Artur Petrosyan 238f65aeea usb: dwc2: Clear fifo_map when resetting core.
Switching from device mode to host mode by disconnecting
device cable core enters and exits form hibernation.
However, the fifo map remains not cleared. It results
to a WARNING (WARNING: CPU: 5 PID: 0 at drivers/usb/dwc2/
gadget.c:307 dwc2_hsotg_init_fifo+0x12/0x152 [dwc2])
if in host mode we disconnect the micro a to b host
cable. Because core reset occurs.

To avoid the WARNING, fifo_map should be cleared
in dwc2_core_reset() function by taking into account configs.
fifo_map must be cleared only if driver is configured in
"CONFIG_USB_DWC2_PERIPHERAL" or "CONFIG_USB_DWC2_DUAL_ROLE"
mode.

- Added "static inline void dwc2_clear_fifo_map()" helper
function to clear fifo_map with peripheral or dual role mode.

- Added a dummy version of "dwc2_clear_fifo_map()" helper
for host-only mode.

Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Link: https://lore.kernel.org/r/20210416124731.C500AA005D@mailhost.synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 11:55:34 +02:00
..
atm drivers: usb: atm: use pr_err() and pr_warn() instead of raw printk() 2020-12-09 15:22:51 +01:00
c67x00 usb/c67x00: Replace tasklet with work 2021-01-26 18:36:37 +01:00
cdns3 usb: cdnsp: Fixes issue with Configure Endpoint command 2021-04-12 20:19:23 +08:00
chipidea usb: chipidea: tegra: Silence deferred probe error 2021-03-23 12:50:32 +01:00
class USB-serial updates for 5.13-rc1 2021-04-22 11:19:49 +02:00
common usb: common: move function's kerneldoc next to its definition 2021-03-10 09:37:17 +01:00
core USB: Add reset-resume quirk for WD19's Realtek Hub 2021-04-22 10:52:56 +02:00
dwc2 usb: dwc2: Clear fifo_map when resetting core. 2021-04-22 11:55:34 +02:00
dwc3 usb: dwc3: gadget: Remove FS bInterval_m1 limitation 2021-04-22 11:04:24 +02:00
early usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic() 2020-09-25 16:29:09 +02:00
gadget usb: gadget: net2272: remove redundant initialization of status 2021-04-22 10:52:15 +02:00
host usb: xhci-mtk: remove bus status check 2021-04-22 11:02:07 +02:00
image USB: microtek: use set_host_byte() 2020-09-16 12:42:10 +02:00
isp1760 usb: isp1760-hcd: convert to readl_poll_timeout_atomic() 2020-09-25 16:30:05 +02:00
misc usb: misc: adutux: fix whitespace coding style issue 2021-04-22 10:49:53 +02:00
mon USB: mon: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 09:49:28 +01:00
mtu3 usb: mtu3: drop CONFIG_OF 2021-03-26 14:47:19 +01:00
musb usb: musb: musb_core: Add space after that ',' 2021-04-22 10:49:22 +02:00
phy usb: phy: phy-mxs-usb: Use of_device_get_match_data() 2021-01-18 18:35:46 +01:00
renesas_usbhs usb: renesas_usbhs: fix error return code of usbhsf_pkt_handler() 2021-03-23 12:42:15 +01:00
roles usb: roles: Call try_module_get() from usb_role_switch_find_by_fwnode() 2021-04-09 16:07:03 +02:00
serial USB: serial: xr: add copyright notice 2021-04-13 18:36:39 +02:00
storage usb: storage: datafab: remove redundant assignment of variable result 2021-04-22 10:52:10 +02:00
typec usb: typec: tcpm: Fix error while calculating PPS out values 2021-04-22 08:57:34 +02:00
usbip usbip: vudc: fix missing unlock on error in usbip_sockfd_store() 2021-04-12 10:29:50 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver 2020-12-29 12:36:13 +08:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00