linux-stable/drivers/usb
Javier Carrasco 40b963e45c usb: typec: tipd: fix event checking for tps6598x
commit 409c1cfb5a upstream.

The current interrupt service routine of the tps6598x only reads the
first 64 bits of the INT_EVENT1 and INT_EVENT2 registers, which means
that any event above that range will be ignored, leaving interrupts
unattended. Moreover, those events will not be cleared, and the device
will keep the interrupt enabled.

This issue has been observed while attempting to load patches, and the
'ReadyForPatch' field (bit 81) of INT_EVENT1 was set.

Given that older versions of the tps6598x (1, 2 and 6) provide 8-byte
registers, a mechanism based on the upper byte of the version register
(0x0F) has been included. The manufacturer has confirmed [1] that this
byte is always 0 for older versions, and either 0xF7 (DH parts) or 0xF9
(DK parts) is returned in newer versions (7 and 8).

Read the complete INT_EVENT registers to handle all interrupts generated
by the device and account for the hardware version to select the
register size.

Link: https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1346521/tps65987d-register-command-to-distinguish-between-tps6591-2-6-and-tps65987-8 [1]
Fixes: 0a4c005bd1 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers")
Cc: stable@vger.kernel.org
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
Link: https://lore.kernel.org/r/20240429-tps6598x_fix_event_handling-v3-2-4e8e58dce489@wolfvision.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-25 16:22:54 +02:00
..
atm
c67x00
cdns3 usb: cdns3: fix memory double free when handle zero packet 2024-03-01 13:35:02 +01:00
chipidea usb: chipidea: core: handle power lost in workqueue 2024-02-23 09:24:57 +01:00
class Revert "usb: cdc-wdm: close race between read and workqueue" 2024-04-27 17:11:40 +02:00
common usb: ulpi: Fix debugfs directory leak 2024-02-23 09:24:56 +01:00
core USB: core: Fix access violation during port device removal 2024-05-17 12:02:28 +02:00
dwc2 usb: dwc2: host: Fix dereference issue in DDMA completion flow. 2024-04-27 17:11:40 +02:00
dwc3 usb: dwc3: Wait unconditionally after issuing EndXfer command 2024-05-25 16:22:54 +02:00
early
fotg210 usb: fotg210-hcd: delete an incorrect bounds test 2024-01-01 12:42:41 +00:00
gadget usb: gadget: f_fs: Fix a race condition when processing setup packets. 2024-05-17 12:02:29 +02:00
host usb: xhci-plat: Don't include xhci.h 2024-05-17 12:02:29 +02:00
image
isp1760
misc usb: misc: onboard-hub: add support for Microchip USB5744 2023-12-03 07:33:08 +01:00
mon usb: mon: Fix atomicity violation in mon_bin_vma_fault 2024-01-25 15:35:43 -08:00
mtu3
musb
phy Revert "usb: phy: generic: Get the vbus supply" 2024-04-03 15:28:58 +02:00
renesas_usbhs
roles usb: roles: don't get/set_role() when usb_role_switch is unregistered 2024-03-01 13:35:02 +01:00
serial USB: serial: option: add Telit FN920C04 rmnet compositions 2024-04-27 17:11:40 +02:00
storage USB: UAS: return ENODEV when submit urbs fail with device not attached 2024-04-03 15:28:58 +02:00
typec usb: typec: tipd: fix event checking for tps6598x 2024-05-25 16:22:54 +02:00
usbip
Kconfig
Makefile
usb-skeleton.c