usb: pd: Set PD_T_SINK_WAIT_CAP to 310ms
PATCH 1/1 usb: pd: Set PD_T_SINK_WAIT_CAP to 310ms
Current timer PD_T_SINK_WAIT_CAP is set to 240ms which will violate the SinkWaitCapTimer (tTypeCSinkWaitCap 310 - 620 ms) defined in the PD Spec if the port is faster enough when running the state machine. Set it to the lower bound 310ms to ensure the timeout is in Spec.
Fixes f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)")
Signed-off-by Kyle Tso <[email protected]>
--- include/linux/usb/pd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/usb/pd.h +1 -1
@@ -460,7 +460,7 @@ static inline unsigned int rdo_max_power(u32 rdo)#define PD_T_RECEIVER_RESPONSE 15/* 15ms max */ #define PD_T_SOURCE_ACTIVITY 45#define PD_T_SINK_ACTIVITY 135 -#define PD_T_SINK_WAIT_CAP 240 +#define PD_T_SINK_WAIT_CAP 310/* 310 - 620 ms */ #define PD_T_PS_TRANSITION 500#define PD_T_SRC_TRANSITION 35#define PD_T_DRP_SNK 40
Signature · 1 line
2.32.0.rc0.204.g9fa02ecfa5-goog
Quoted 7 lines · Kyle Tso
Current timer
PD_T_SINK_WAIT_CAPis set to 240ms which will violate the SinkWaitCapTimer (tTypeCSinkWaitCap 310 - 620 ms) defined in the PD Spec if the port is faster enough when running the state machine. Set it to the lower bound 310ms to ensure the timeout is in Spec.Fixes f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)")Signed-off-by Kyle Tso <[email protected]>
Reviewed-by Guenter Roeck <[email protected]>
Quoted 18 lines
--- include/linux/usb/pd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/usb/pd.h +1
-1@@ -460,7 +460,7 @@ static inline unsigned int rdo_max_power(u32 rdo)#define PD_T_RECEIVER_RESPONSE 15/* 15ms max */ #define PD_T_SOURCE_ACTIVITY 45#define PD_T_SINK_ACTIVITY 135 -#define PD_T_SINK_WAIT_CAP 240 +#define PD_T_SINK_WAIT_CAP 310/* 310 - 620 ms */ #define PD_T_PS_TRANSITION 500#define PD_T_SRC_TRANSITION 35#define PD_T_DRP_SNK 40