Skip to content

usb: typec: tcpm/tcpci_maxim: lockdep, wakeup and vbus regulator fixes

André Draszik linux-rt-devel linux-usb stable 3 versions – In review

Get series with b4
b4 am [email protected] change-id 20261123-max77759-wait-10974f4c312d

Versions newest first

  1. v3 Latest4 patches 1 replyIn review
  2. v24 patches 5 repliesSuperseded
  3. v12 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- collect Heikki's Acked-by on patch 3
- also add Cc: [email protected] to patch 4/4
- Link to v2: https://lore.kernel.org/r/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4usb: typec: tcpm/tcpci_maxim: fix invalid wait contextdrivers/usb/typec/tcpm/tcpci_maxim_core.c+3 -130 replies
2/4usb: typec: tcpm/tcpci_maxim: init wakeup before irqdrivers/usb/typec/tcpm/tcpci_maxim_core.c+4 -40 replies
3/4usb: typec: tcpm/tcpci_maxim: fix vbus regulator UAF on unbinddrivers/usb/typec/tcpm/tcpci_maxim_core.c+14 -20 replies
4/4usb: typec: tcpm/tcpci_maxim: only complain about vbus when sourcingdrivers/usb/typec/tcpm/tcpci_maxim_core.c+16 -101 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchHeikki Krogerus
1/4A-b
2/4A-b
3/4A-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/4] usb: typec: tcpm/tcpci_maxim: lockdep, wakeup and vbus regulator fixes

Hi,

These four patches fix a lockdep invalid wait context splat, a probe/unbind wakeup-event race, and two vbus regulator lifetime and logging bugs in the Maxim 77759 TCPCI driver:

- Call pm_wakeup_event() from the threaded IRQ handler instead of the hard IRQ handler (the driver uses IRQF_ONESHOT, so the primary handler runs in hard IRQ context even on PREEMPT_RT).
- Initialise device wakeup before requesting the IRQ, so a pending alert or an interrupt during unbind cannot miss recording a wakeup event.
- Fix a vbus regulator use-after-free on driver unbind.
- Drop an irrelevant error message when VBUS sourcing is not requested.

Tested on Pixel 6 (Oriole) with CONFIG_PROVE_RAW_LOCK_NESTING=y enabled, including tcpci_maxim module unload and reload cycles.

Cheers
Andre'

---
Changes in v3:
- collect Heikki's Acked-by on patch 3
- also add Cc: [email protected] to patch 4/4
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- add patches for two more issues, a UAF and a spurious irrelevant
warning
- collect Heikki's Acked-by on patches 1 and 2.
- rebase onto next-20261123.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
André Draszik (4):
usb: typec: tcpm/tcpci_maxim: fix invalid wait context
usb: typec: tcpm/tcpci_maxim: init wakeup before irq
usb: typec: tcpm/tcpci_maxim: fix vbus regulator UAF on unbind
usb: typec: tcpm/tcpci_maxim: only complain about vbus when sourcing

 drivers/usb/typec/tcpm/tcpci_maxim_core.c | 62 +++++++++++++++++--------------
 1 file changed, 35 insertions(+), 27 deletions(-)

---
base-commit: 3191063649dbf7c0d0b768e1f3655e4c5fc6edb5
change-id: 20261123-max77759-wait-10974f4c312d

Best regards,

Signature · 1 line
André Draszik <[email protected]>