Re: [PATCH v2] usb: typec: tcpci: quiesce the IRQ before unregistering the TCPM port

From: Yaohan Li

Date: Wed Nov 11 2026 - 21:03:11 EST


Hi Xu,

Thanks for taking another look. I'll shorten the commit message.

I checked the IRQ path again. tcpci_irq() reads TCPC_ALERT and handles the status bits directly. The alert_mask field is used for the IRQ return value and the loop condition, but it doesn't filter those initial TCPM callbacks.

My concern is the case where an alert is still latched, or the mask write fails during removal. Since the IRQ is shared, another device could cause _tcpci_irq() to run after synchronize_irq() has returned. Without the stopping check, that handler could still reach TCPM after the port has been unregistered.

Does the TCPCI specification guarantee that TCPC_ALERT reads as zero once its mask is cleared, including for previously latched alerts? If so, I've missed that guarantee and can simplify the patch. Otherwise, I think the stopping check is still needed for that last window.

Thanks,
Yaohan