linux-stable/drivers/usb
Javier Carrasco d88a0e57ac 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:30:55 +02:00
..
atm usb: ueagle-atm: Use wait_event_freezable_timeout() in uea_wait() 2024-01-04 15:57:29 +01:00
c67x00 USB: c67x00: Remove unused declaration c67x00_hcd_msg_received() 2023-10-02 16:42:33 +02:00
cdns3 usb: cdns3: Fix spelling mistake "supporte" -> "supported" 2024-03-02 20:37:19 +01:00
chipidea usb: chipidea: core: handle power lost in workqueue 2024-01-27 16:39:14 -08:00
class Revert "usb: cdc-wdm: close race between read and workqueue" 2024-04-18 16:33:28 +02:00
common usb: ulpi: Fix debugfs directory leak 2024-01-27 17:41:42 -08:00
core usb: Fix regression caused by invalid ep0 maxpacket in virtual SuperSpeed device 2024-04-30 18:05:27 +02:00
dwc2 usb: dwc2: host: Fix dereference issue in DDMA completion flow. 2024-04-09 17:29:38 +02:00
dwc3 usb: dwc3: Wait unconditionally after issuing EndXfer command 2024-05-25 16:30:54 +02:00
early
fotg210 USB / Thunderbolt changes for 6.8-rc1 2024-01-18 11:43:55 -08:00
gadget usb: gadget: f_fs: Fix a race condition when processing setup packets. 2024-04-23 16:26:10 -07:00
host usb: ohci: Prevent missed ohci interrupts 2024-04-30 18:04:40 +02:00
image usb: image: mdc800: Remove redundant assignment to variable retval 2024-02-17 17:01:13 +01:00
isp1760 mm, slab: remove last vestiges of SLAB_MEM_SPREAD 2024-03-12 20:32:19 -07:00
misc usb: misc: onboard_usb_hub: Disable the USB hub clock on failure 2024-04-11 14:28:47 +02:00
mon usb: mon: Fix atomicity violation in mon_bin_vma_fault 2024-01-05 10:36:08 +01:00
mtu3 usb: mtu3: Add MT8195 MTU3 ip-sleep wakeup support 2024-01-27 17:36:50 -08:00
musb usb: musb: remove unused variable 'count' 2024-03-05 13:25:16 +00:00
phy Revert "usb: phy: generic: Get the vbus supply" 2024-03-26 14:57:22 +01:00
renesas_usbhs
roles Merge v6.8-rc6 into usb-next 2024-02-26 06:53:50 +01:00
serial USB: serial: option: add Telit FN920C04 rmnet compositions 2024-04-18 17:14:49 +02:00
storage USB: UAS: return ENODEV when submit urbs fail with device not attached 2024-03-26 10:50:56 +01:00
typec usb: typec: tipd: fix event checking for tps6598x 2024-05-25 16:30:55 +02:00
usbip USB: core: Use device_driver directly in struct usb_driver and usb_device_driver 2024-01-04 16:06:32 +01:00
Kconfig usb: pci-quirks: handle HAS_IOPORT dependency for AMD quirk 2023-10-02 16:19:12 +02:00
Makefile
usb-skeleton.c