* [PATCH] usb: pd: Set PD_T_SINK_WAIT_CAP to 310ms
@ 2021-05-28 8:16 Kyle Tso
2021-05-28 13:09 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Kyle Tso @ 2021-05-28 8:16 UTC (permalink / raw)
To: linux, gregkh; +Cc: badhri, linux-usb, linux-kernel, Kyle Tso
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 <kyletso@google.com>
---
include/linux/usb/pd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/usb/pd.h b/include/linux/usb/pd.h
index bf00259493e0..96b7ff66f074 100644
--- a/include/linux/usb/pd.h
+++ b/include/linux/usb/pd.h
@@ -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
--
2.32.0.rc0.204.g9fa02ecfa5-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: pd: Set PD_T_SINK_WAIT_CAP to 310ms
2021-05-28 8:16 [PATCH] usb: pd: Set PD_T_SINK_WAIT_CAP to 310ms Kyle Tso
@ 2021-05-28 13:09 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-05-28 13:09 UTC (permalink / raw)
To: Kyle Tso, gregkh; +Cc: badhri, linux-usb, linux-kernel
On 5/28/21 1:16 AM, Kyle Tso wrote:
> 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 <kyletso@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> include/linux/usb/pd.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/usb/pd.h b/include/linux/usb/pd.h
> index bf00259493e0..96b7ff66f074 100644
> --- a/include/linux/usb/pd.h
> +++ b/include/linux/usb/pd.h
> @@ -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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-28 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 8:16 [PATCH] usb: pd: Set PD_T_SINK_WAIT_CAP to 310ms Kyle Tso
2021-05-28 13:09 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).