mirror of
https://github.com/torvalds/linux.git
synced 2026-03-14 20:46:15 +01:00
There's the altmode re-registeration issue after data role
swap (DR_SWAP).
Comparing to USBPD 2.0, in USBPD 3.0, it loose the limit that only DFP
can initiate the VDM command to get partner identity information.
For a USBPD 3.0 UFP device, it may already get the identity information
from its port partner before DR_SWAP. If DR_SWAP send or receive at the
mean time, 'send_discover' flag will be raised again. It causes discover
identify action restart while entering ready state. And after all
discover actions are done, the 'tcpm_register_altmodes' will be called.
If old altmode is not unregistered, this sysfs create fail can be found.
In 'DR_SWAP_CHANGE_DR' state case, only DFP will unregister altmodes.
For UFP, the original altmodes keep registered.
This patch fix the logic that after DR_SWAP, 'tcpm_unregister_altmodes'
must be called whatever the current data role is.
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Fixes:
|
||
|---|---|---|
| .. | ||
| altmodes | ||
| mux | ||
| tcpm | ||
| tipd | ||
| ucsi | ||
| anx7411.c | ||
| bus.c | ||
| bus.h | ||
| class.c | ||
| class.h | ||
| hd3ss3220.c | ||
| Kconfig | ||
| Makefile | ||
| mux.c | ||
| mux.h | ||
| pd.c | ||
| pd.h | ||
| port-mapper.c | ||
| qcom-pmic-typec.c | ||
| retimer.c | ||
| retimer.h | ||
| rt1719.c | ||
| stusb160x.c | ||
| wusb3801.c | ||