linux/drivers/usb/typec
Badhri Jagan Sridharan 78e0ea4277 tcpm: Avoid soft reset when partner does not support get_status
When partner does not support get_status message, tcpm right now
responds with soft reset message. This causes PD renegotiation to
happen and resets PPS link. Avoid soft resetting the link when
partner does not support get_status message to mitigate PPS resets.

[  208.926752] Setting voltage/current limit 9500 mV 2450 mA
[  208.930407] set_auto_vbus_discharge_threshold mode:3 pps_active:y vbus:9500 ret:0
[  208.930418] state change SNK_TRANSITION_SINK -> SNK_READY [rev3 POWER_NEGOTIATION]
[  208.930455] AMS POWER_NEGOTIATION finished

// ALERT message from the Source
[  213.948442] PD RX, header: 0x19a6 [1]
[  213.948451] state change SNK_READY -> GET_STATUS_SEND [rev3 GETTING_SOURCE_SINK_STATUS]
[  213.948457] PD TX, header: 0x492
[  213.950402] PD TX complete, status: 0
[  213.950427] pending state change GET_STATUS_SEND -> GET_STATUS_SEND_TIMEOUT @ 60 ms [rev3 GETTING_SOURCE_SINK_STATUS]

// NOT_SUPPORTED from the Source
[  213.959954] PD RX, header: 0xbb0 [1]

// sink sends SOFT_RESET
[  213.959958] state change GET_STATUS_SEND -> SNK_SOFT_RESET [rev3 GETTING_SOURCE_SINK_STATUS]
[  213.959962] AMS GETTING_SOURCE_SINK_STATUS finished
[  213.959964] AMS SOFT_RESET_AMS start
[  213.959966] state change SNK_SOFT_RESET -> AMS_START [rev3 SOFT_RESET_AMS]
[  213.959969] state change AMS_START -> SOFT_RESET_SEND [rev3 SOFT_RESET_AMS]

Cc: stable@vger.kernel.org
Fixes: 8dea75e113 ("usb: typec: tcpm: Protocol Error handling")
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230820044449.1005889-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-23 11:13:09 +02:00
..
altmodes usb: typec: altmodes/displayport: add support for embedded DP cases 2023-08-22 14:45:53 +02:00
mux Merge 6.5-rc6 into usb-next 2023-08-14 22:22:31 +02:00
tcpm tcpm: Avoid soft reset when partner does not support get_status 2023-08-23 11:13:09 +02:00
tipd Merge 6.4-rc5 into usb-next 2023-06-05 07:39:02 +02:00
ucsi usb: typec: ucsi: Add debugfs for ucsi commands 2023-08-08 10:36:18 +02:00
anx7411.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00
bus.c usb: typec: bus: verify partner exists in typec_altmode_attention 2023-08-22 14:44:28 +02:00
bus.h USB: mark all struct bus_type as const 2023-03-23 13:22:00 +01:00
class.c usb: typec: Use sysfs_emit_at when concatenating the string 2023-07-25 17:45:29 +02:00
class.h usb: typec: Add retimer handle to port 2022-07-14 16:24:05 +02:00
hd3ss3220.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00
Kconfig usb: typec: qcom: Add Qualcomm PMIC Type-C driver 2023-05-13 19:03:46 +09:00
Makefile usb: typec: qcom: Add Qualcomm PMIC Type-C driver 2023-05-13 19:03:46 +09:00
mux.c usb: typec: mux: Remove alt mode parameters from the API 2023-05-29 15:17:52 +01:00
mux.h usb: typec: mux: Introduce indirection 2022-04-26 13:47:13 +02:00
pd.c usb: typec: Fix fast_role_swap_current show function 2023-06-13 12:16:07 +02:00
pd.h usb: typec: Separate USB Power Delivery from USB Type-C 2022-06-12 06:49:47 +02:00
port-mapper.c ACPI: bus: Introduce acpi_bus_for_each_dev() 2022-03-02 20:55:47 +01:00
retimer.c drivers: remove struct module * setting from struct class 2023-03-17 15:16:27 +01:00
retimer.h usb: typec: Make bus switch code retimer-aware 2023-01-17 17:29:00 +01:00
rt1719.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00
stusb160x.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00
wusb3801.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00