WSL2-Linux-Kernel/drivers/usb/dwc2
Oliver Neukum a22702a818 USB: dwc2: write HCINT with INTMASK applied
commit 0583bc776ca5b5a3f5752869fc31cf7322df2b35 upstream.

dwc2_hc_n_intr() writes back INTMASK as read but evaluates it
with intmask applied. In stress testing this causes spurious
interrupts like this:

[Mon Aug 14 10:51:07 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 7 - ChHltd set, but reason is unknown
[Mon Aug 14 10:51:07 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001
[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 0 - ChHltd set, but reason is unknown
[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001
[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 - ChHltd set, but reason is unknown
[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001
[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_update_urb_state_abn(): trimming xfer length

Applying INTMASK prevents this. The issue exists in all versions of the
driver.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Tested-by: Ivan Ivanov <ivan.ivanov@suse.com>
Tested-by: Andrea della Porta <andrea.porta@suse.com>
Link: https://lore.kernel.org/r/20231115144514.15248-1-oneukum@suse.com
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-03 07:31:25 +01:00
..
Kconfig
Makefile
core.c
core.h usb: dwc2: drd: fix soft connect when gadget is unconfigured 2022-03-02 11:48:05 +01:00
core_intr.c
debug.h
debugfs.c
drd.c usb: dwc2: drd: fix soft connect when gadget is unconfigured 2022-03-02 11:48:05 +01:00
gadget.c usb: dwc2: gadget: remove D+ pull-up while no vbus with usb-role-switch 2022-08-25 11:40:33 +02:00
hcd.c usb: dwc2: fix possible NULL pointer dereference caused by driver concurrency 2023-11-20 11:08:25 +01:00
hcd.h
hcd_ddma.c
hcd_intr.c USB: dwc2: write HCINT with INTMASK applied 2023-12-03 07:31:25 +01:00
hcd_queue.c usb: dwc2: hcd_queue: Fix use of floating point literal 2021-12-01 09:04:39 +01:00
hw.h
params.c
pci.c
platform.c usb: dwc2: Fix some error handling paths 2023-07-23 13:47:21 +02:00