linux/drivers/usb
Xiaolei Wang bbc9c36527 usb: cdns3: Put the cdns set active part outside the spin lock
[ Upstream commit 2319b9c87f ]

The device may be scheduled during the resume process,
so this cannot appear in atomic operations. Since
pm_runtime_set_active will resume suppliers, put set
active outside the spin lock, which is only used to
protect the struct cdns data structure, otherwise the
kernel will report the following warning:

  BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1163
  in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 651, name: sh
  preempt_count: 1, expected: 0
  RCU nest depth: 0, expected: 0
  CPU: 0 PID: 651 Comm: sh Tainted: G        WC         6.1.20 #1
  Hardware name: Freescale i.MX8QM MEK (DT)
  Call trace:
    dump_backtrace.part.0+0xe0/0xf0
    show_stack+0x18/0x30
    dump_stack_lvl+0x64/0x80
    dump_stack+0x1c/0x38
    __might_resched+0x1fc/0x240
    __might_sleep+0x68/0xc0
    __pm_runtime_resume+0x9c/0xe0
    rpm_get_suppliers+0x68/0x1b0
    __pm_runtime_set_status+0x298/0x560
    cdns_resume+0xb0/0x1c0
    cdns3_controller_resume.isra.0+0x1e0/0x250
    cdns3_plat_resume+0x28/0x40

Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20230616021952.1025854-1-xiaolei.wang@windriver.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 11:11:06 +02:00
..
atm
c67x00
cdns3 usb: cdns3: Put the cdns set active part outside the spin lock 2023-09-23 11:11:06 +02:00
chipidea usb: chipidea: imx: improve logic if samsung,picophy-* parameter is 0 2023-09-06 21:27:01 +01:00
class
common usb: common: usb-conn-gpio: Prevent bailing out if initial role is none 2023-08-16 18:27:24 +02:00
core USB: core: Fix oversight in SuperSpeed initialization 2023-09-13 09:43:04 +02:00
dwc2
dwc3 usb: dwc3: meson-g12a: do post init to fix broken usb after resumption 2023-09-06 21:27:00 +01:00
early
gadget USB: gadget: f_mass_storage: Fix unused variable warning 2023-09-13 09:42:54 +02:00
host Revert "xhci: add quirk for host controllers that don't update endpoint DCS" 2023-08-03 10:24:12 +02:00
image
isp1760
misc usb: misc: ehset: fix wrong if condition 2023-08-03 10:24:10 +02:00
mon
mtu3
musb
phy usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host() 2023-09-13 09:42:51 +02:00
renesas_usbhs
roles
serial USB: serial: option: add FOXCONN T99W368/T99W373 product 2023-09-06 21:27:00 +01:00
storage usb-storage: alauda: Fix uninit-value in alauda_check_media() 2023-08-16 18:27:24 +02:00
typec usb: typec: bus: verify partner exists in typec_altmode_attention 2023-09-13 09:43:04 +02:00
usbip
Kconfig
Makefile
usb-skeleton.c