linux-stable/drivers
Stefan Wahren 55320f5cdd usb: dwc2: Fix HCD resume
commit 336f72d3cb upstream.

The Raspberry Pi can suffer on interrupt storms on HCD resume. The dwc2
driver sometimes misses to enable HCD_FLAG_HW_ACCESSIBLE before re-enabling
the interrupts. This causes a situation where both handler ignore a incoming
port interrupt and force the upper layers to disable the dwc2 interrupt
line. This leaves the USB interface in a unusable state:

irq 66: nobody cared (try booting with the "irqpoll" option)
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W          6.10.0-rc3
Hardware name: BCM2835
Call trace:
unwind_backtrace from show_stack+0x10/0x14
show_stack from dump_stack_lvl+0x50/0x64
dump_stack_lvl from __report_bad_irq+0x38/0xc0
__report_bad_irq from note_interrupt+0x2ac/0x2f4
note_interrupt from handle_irq_event+0x88/0x8c
handle_irq_event from handle_level_irq+0xb4/0x1ac
handle_level_irq from generic_handle_domain_irq+0x24/0x34
generic_handle_domain_irq from bcm2836_chained_handle_irq+0x24/0x28
bcm2836_chained_handle_irq from generic_handle_domain_irq+0x24/0x34
generic_handle_domain_irq from generic_handle_arch_irq+0x34/0x44
generic_handle_arch_irq from __irq_svc+0x88/0xb0
Exception stack(0xc1b01f20 to 0xc1b01f68)
1f20: 0005c0d4 00000001 00000000 00000000 c1b09780 c1d6b32c c1b04e54 c1a5eae8
1f40: c1b04e90 00000000 00000000 00000000 c1d6a8a0 c1b01f70 c11d2da8 c11d4160
1f60: 60000013 ffffffff
__irq_svc from default_idle_call+0x1c/0xb0
default_idle_call from do_idle+0x21c/0x284
do_idle from cpu_startup_entry+0x28/0x2c
cpu_startup_entry from kernel_init+0x0/0x12c
handlers:
[<f539e0f4>] dwc2_handle_common_intr
[<75cd278b>] usb_hcd_irq
Disabling IRQ #66

So enable the HCD_FLAG_HW_ACCESSIBLE flag in case there is a port
connection.

Fixes: c74c26f6e3 ("usb: dwc2: Fix partial power down exiting by system resume")
Closes: https://lore.kernel.org/linux-usb/3fd0c2fb-4752-45b3-94eb-42352703e1fd@gmx.net/T/
Link: https://lore.kernel.org/all/5e8cbce0-3260-2971-484f-fc73a3b2bd28@synopsys.com/
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20241202001631.75473-2-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-19 18:07:17 +01:00
..
accessibility speakup: Fix sizeof() vs ARRAY_SIZE() bug 2024-06-16 13:39:11 +02:00
acpi ACPI: CPPC: Fix _CPC register setting issue 2024-12-14 19:50:45 +01:00
amba
android binder: fix UAF caused by offsets overwrite 2024-09-12 11:07:51 +02:00
ata ata: sata_highbank: fix OF node reference leak in highbank_initialize_phys() 2024-12-19 18:07:17 +01:00
atm atm: idt77252: prevent use after free in dequeue_rx() 2024-09-04 13:23:18 +02:00
auxdisplay
base regmap: detach regmap from dev on regmap_exit 2024-12-14 19:51:34 +01:00
bcma
block brd: defer automatic disk creation until module initialization succeeds 2024-12-14 19:50:42 +01:00
bluetooth Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001 2024-10-22 15:40:45 +02:00
bus bus: integrator-lm: fix OF node leak in probe() 2024-10-17 15:11:12 +02:00
cdrom
char virtio_console: fix misc probe bugs 2024-10-17 15:11:49 +02:00
clk Revert "drivers: clk: zynqmp: update divider round rate logic" 2024-12-14 19:51:12 +01:00
clocksource clocksource/drivers:sp804: Make user selectable 2024-12-14 19:50:46 +01:00
comedi comedi: Flush partial mappings in error case 2024-12-14 19:51:13 +01:00
connector
counter counter: stm32-timer-cnt: Add check for clk_enable() 2024-12-14 19:51:11 +01:00
cpufreq cpufreq: mediatek-hw: Fix wrong return value in mtk_cpufreq_get_cpu_power() 2024-12-14 19:51:15 +01:00
cpuidle cpuidle: Avoid potential overflow in integer multiplication 2024-04-13 13:01:43 +02:00
crypto crypto: hisilicon/qm - inject error before stopping queue 2024-12-14 19:51:45 +01:00
cxl
dax
dca
devfreq PM / devfreq: Synchronize devfreq_monitor_[start/stop] 2024-02-23 08:54:38 +01:00
dio
dma dmaengine: dw: Add memory bus width verification 2024-09-04 13:23:40 +02:00
dma-buf dma-buf: fix dma_fence_array_signaled v4 2024-12-14 19:51:33 +01:00
edac EDAC/igen6: Avoid segmentation fault on module unload 2024-12-14 19:50:45 +01:00
eisa
extcon extcon: max8997: select IRQ_DOMAIN instead of depending on it 2024-06-16 13:39:39 +02:00
firewire firewire: nosy: ensure user_length is taken into account when fetching packet contents 2024-05-17 11:51:01 +02:00
firmware arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint 2024-12-14 19:51:46 +01:00
fpga fpga: region: add owner module and take its refcount 2024-06-16 13:39:38 +02:00
fsi
gnss
gpio gpio: grgpio: Add NULL check in grgpio_probe 2024-12-14 19:51:29 +01:00
gpu drm/amdgpu: rework resume handling for display (v2) 2024-12-14 19:51:47 +01:00
greybus greybus: Fix use-after-free bug in gb_interface_release due to race condition. 2024-07-05 09:14:23 +02:00
hid HID: wacom: fix when get product name maybe null pointer 2024-12-14 19:51:31 +01:00
hsi
hv Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic 2024-09-12 11:07:51 +02:00
hwmon hwmon: (tps23861) Fix reporting of negative temperatures 2024-12-14 19:51:07 +01:00
hwspinlock hwspinlock: Introduce hwspin_lock_bust() 2024-09-12 11:07:41 +02:00
hwtracing coresight: tmc: sg: Do not leak sg_table 2024-10-17 15:11:06 +02:00
i2c i2c: smbus: Check for parent device before dereference 2024-10-17 15:12:01 +02:00
i3c i3c: Use i3cdev->desc->info instead of calling i3c_device_get_info() to avoid deadlock 2024-12-14 19:51:42 +01:00
idle
iio ad7780: fix division by zero in ad7780_write_raw() 2024-12-14 19:51:23 +01:00
infiniband RDMA/hns: Fix NULL pointer derefernce in hns_roce_map_mr_sg() 2024-12-14 19:51:03 +01:00
input Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal 2024-10-17 15:11:49 +02:00
interconnect interconnect: qcom: sm8250: Enable sync_state 2024-10-17 15:11:06 +02:00
iommu iommu/arm-smmu: Defer probe of clients after smmu device bound 2024-12-14 19:51:34 +01:00
ipack
irqchip irqchip/ocelot: Fix trigger register address 2024-11-17 15:06:24 +01:00
isdn mISDN: Fix a use after free in hfcmulti_tx() 2024-08-19 05:45:25 +02:00
leds leds: class: Protect brightness_show() with led_cdev->led_access mutex 2024-12-14 19:51:41 +01:00
macintosh macintosh/therm_windtunnel: fix module unload. 2024-08-19 05:45:06 +02:00
mailbox mailbox: arm_mhuv2: clean up loop in get_irq_chan_comb() 2024-12-14 19:51:04 +01:00
mcb
md bcache: revert replacing IS_ERR_OR_NULL with IS_ERR again 2024-12-14 19:51:33 +01:00
media media: venus: vdec: fixed possible memory leak issue 2024-12-14 19:51:47 +01:00
memory memory: stm32-fmc2-ebi: check regmap_read return value 2024-09-04 13:23:25 +02:00
memstick
message scsi: fusion: Remove unused variable 'rc' 2024-12-14 19:51:02 +01:00
mfd mfd: rt5033: Fix missing regmap_del_irq_chip() 2024-12-14 19:51:02 +01:00
misc misc: eeprom: eeprom_93cx6: Add quirk for extra read clock cycle 2024-12-14 19:51:42 +01:00
mmc mmc: mtk-sd: Fix error handle of probe function 2024-12-14 19:51:45 +01:00
most
mtd ubi: fastmap: Fix duplicate slab cache names while attaching 2024-12-14 19:51:20 +01:00
mux
net net: dsa: microchip: correct KSZ8795 static MAC table access 2024-12-14 19:51:47 +01:00
nfc nfc: pn533: Add poll mod list filling check 2024-09-04 13:23:40 +02:00
ntb ntb: ntb_hw_switchtec: Fix use after free vulnerability in switchtec_ntb_remove due to race condition 2024-10-17 15:11:51 +02:00
nubus
nvdimm nvdimm: rectify the illogical code within nd_dax_probe() 2024-12-14 19:51:41 +01:00
nvme nvme-pci: fix freeing of the HMB descriptor table 2024-12-14 19:50:43 +01:00
nvmem nvmem: Fix return type of devm_nvmem_device_get() in kerneldoc 2024-09-12 11:07:51 +02:00
of of/irq: Refer to actual buffer size in of_irq_parse_one() 2024-10-17 15:11:32 +02:00
opp OPP: debugfs: Fix warning around icc_get_name() 2024-03-26 18:21:23 -04:00
parisc
parport parport: Proper fix for array out-of-bounds access 2024-10-22 15:40:46 +02:00
pci PCI: Add ACS quirk for Wangxun FF5xxx NICs 2024-12-14 19:51:42 +01:00
pcmcia pcmcia: Use resource_size function on resource object 2024-09-12 11:07:46 +02:00
perf
phy phy: zynqmp: Enable reference clock correctly 2024-09-04 13:23:42 +02:00
pinctrl pinctrl: qcom-pmic-gpio: add support for PM8937 2024-12-14 19:51:41 +01:00
platform platform/chrome: cros_ec_typec: fix missing fwnode reference decrement 2024-12-14 19:51:16 +01:00
pnp PNP: ACPI: fix fortify warning 2024-02-23 08:54:38 +01:00
power power: supply: bq27xxx: Fix registers of bq27426 2024-12-14 19:51:08 +01:00
powercap powercap: RAPL: fix invalid initialization for pl4_supported field 2024-10-17 15:11:09 +02:00
pps pps: add an error check in parport_attach 2024-10-17 15:11:17 +02:00
ps3
ptp ptp: Add error handling for adjfine callback in ptp_clock_adjtime 2024-12-14 19:51:26 +01:00
pwm pwm: imx27: Workaround of the pwm output bug when decrease the duty cycle 2024-12-14 19:50:48 +01:00
rapidio
ras
regulator regulator: rk808: Add apply_bit for BUCK3 on RK809 2024-12-14 19:50:40 +01:00
remoteproc remoteproc: qcom_q6v5_mss: Re-order writes to the IMEM region 2024-12-14 19:51:07 +01:00
reset reset: k210: fix OF node leak in probe() error path 2024-10-17 15:10:49 +02:00
rpmsg rpmsg: glink: Propagate TX failures in intentless mode as well 2024-12-14 19:51:19 +01:00
rtc rtc: ab-eoz9: don't fail temperature reads on undervoltage notification 2024-12-14 19:51:21 +01:00
s390 s390/cio: Do not unregister the subchannel based on DNV 2024-12-14 19:50:42 +01:00
sbus
scsi scsi: core: Fix scsi_mode_select() buffer length handling 2024-12-14 19:51:46 +01:00
sh sh: intc: Fix use-after-free bug in register_intc_controller() 2024-12-14 19:51:21 +01:00
siox
slimbus slimbus: qcom-ngd-ctrl: Add timeout for wait operation 2024-05-17 11:51:04 +02:00
soc soc: imx8m: Probe the SoC driver as platform driver 2024-12-14 19:51:35 +01:00
soundwire soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps" 2024-10-17 15:10:37 +02:00
spi spi: mpc52xx: Add cancel_work_sync before module remove 2024-12-14 19:51:30 +01:00
spmi spmi: hisi-spmi-controller: Do not override device identifier 2024-07-05 09:14:20 +02:00
ssb ssb: Fix division by zero issue in ssb_calc_clock_rate 2024-09-04 13:23:20 +02:00
staging wifi: wfx: Fix error handling in wfx_core_init() 2024-12-14 19:50:56 +01:00
target scsi: target: core: Fix null-ptr-deref in target_alloc_device() 2024-11-01 01:52:34 +01:00
tc
tee tee: optee: Fix kernel panic caused by incorrect error handling 2024-04-10 16:18:46 +02:00
thermal thermal: core: Initialize thermal zones before registering them 2024-12-14 19:50:44 +01:00
thunderbolt thunderbolt: Mark XDomain as unplugged when router is removed 2024-09-04 13:23:15 +02:00
tty serial: amba-pl011: fix build regression 2024-12-14 19:51:47 +01:00
uio Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic 2024-09-12 11:07:51 +02:00
usb usb: dwc2: Fix HCD resume 2024-12-19 18:07:17 +01:00
vdpa vdpa/mlx5: Fix suboptimal range on iotlb iteration 2024-12-14 19:51:08 +01:00
vfio vfio/pci: Properly hide first-in-list PCIe extended capability 2024-12-14 19:51:08 +01:00
vhost vhost/scsi: null-ptr-dereference in vhost_scsi_get_req() 2024-10-17 15:11:47 +02:00
video fbdev: sh7760fb: Fix a possible memory leak in sh7760fb_alloc_mem() 2024-12-14 19:51:03 +01:00
virt drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map() 2024-06-16 13:39:32 +02:00
virtio vdpa: Add eventfd for the vdpa callback 2024-10-17 15:11:06 +02:00
visorbus
vlynq
vme
w1
watchdog watchdog: rti: of: honor timeout-sec property 2024-12-14 19:51:31 +01:00
xen xen: Fix the issue of resource not being properly released in xenbus_dev_probe() 2024-12-14 19:51:11 +01:00
zorro
Kconfig
Makefile