kernel_samsung_a53x/drivers/usb/dwc2
Oliver Neukum 5fd5b246a0 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>
2024-11-18 12:10:58 +01:00
..
core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core_intr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gadget.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hcd.c usb: dwc2: fix possible NULL pointer dereference caused by driver concurrency 2024-11-18 11:43:05 +01:00
hcd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hcd_ddma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hcd_intr.c USB: dwc2: write HCINT with INTMASK applied 2024-11-18 12:10:58 +01:00
hcd_queue.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hw.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
params.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
platform.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00