linux/drivers/usb
Amelie Delaunay b2cab2a24f usb: dwc2: drd: fix dwc2_force_mode call in dwc2_ovr_init
Instead of forcing the role to Device, check the dr_mode configuration.
If the core is Host only, force the mode to Host, this to avoid the
dwc2_force_mode warning:
WARNING: CPU: 1 PID: 21 at drivers/usb/dwc2/core.c:615 dwc2_drd_init+0x104/0x17c

When forcing mode to Host, dwc2_force_mode may sleep the time the host
role is applied. To avoid sleeping while atomic context, move the call
to dwc2_force_mode after spin_unlock_irqrestore. It is safe, as
interrupts are not yet unmasked here.

Fixes: 17f934024e ("usb: dwc2: override PHY input signals with usb role switch support")
Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20211005095305.66397-2-amelie.delaunay@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-21 12:49:00 +02:00
..
atm usb: atm: Use struct_size() helper 2021-10-05 12:50:22 +02:00
c67x00
cdns3 usb: cdns3: fix race condition before setting doorbell 2021-09-14 10:32:41 +02:00
chipidea Merge 5.15-rc5 into usb-next 2021-10-11 07:39:38 +02:00
class Merge 5.15-rc5 into usb-next 2021-10-11 07:39:38 +02:00
common Partially revert "usb: Kconfig: using select for USB_COMMON dependency" 2021-10-05 13:45:16 +02:00
core usb: core: config: Change sizeof(struct ...) to sizeof(*...) 2021-10-06 08:25:47 +02:00
dwc2 usb: dwc2: drd: fix dwc2_force_mode call in dwc2_ovr_init 2021-10-21 12:49:00 +02:00
dwc3 usb: dwc3: gadget: Change to dev_dbg() when queuing to inactive gadget/ep 2021-10-20 19:37:27 +02:00
early
gadget usb: gadget: u_ether: use eth_hw_addr_set() 2021-10-20 19:31:50 +02:00
host usb: ohci: disable start-of-frame interrupt in ohci_rh_suspend 2021-10-21 12:48:18 +02:00
image
isp1760 usb: isp1760: otg control register access 2021-08-27 16:11:39 +02:00
misc Revert "usb: misc: ehset: Workaround for "special" hubs" 2021-10-07 12:48:54 +02:00
mon
mtu3 usb: mtu3: fix random remote wakeup 2021-08-26 13:41:52 +02:00
musb Merge 5.15-rc6 into usb-next 2021-10-18 09:40:52 +02:00
phy USB: phy: tahvo:remove unnecessary debug log 2021-10-05 12:51:07 +02:00
renesas_usbhs usb: renesas_usbhs: Fix spelling mistake "faile" -> "failed" 2021-08-27 10:29:32 +02:00
roles usb: roles: add helper usb_role_string() 2021-05-27 09:17:18 +02:00
serial USB: serial: qcserial: add EM9191 QDL support 2021-10-07 15:39:06 +02:00
storage usb-storage: Add compatibility quirk flags for iODD 2531/2541 2021-10-18 17:05:34 +02:00
typec usb: typec: tipd: Enable event interrupts by default 2021-10-20 19:31:13 +02:00
usbip usbip:vhci_hcd USB port can get stuck in the disabled state 2021-08-26 13:29:27 +02:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c usb: usb-skeleton: Update min() to min_t() 2021-10-05 12:56:48 +02:00