usb: pd: Set PD_T_SINK_WAIT_CAP to 310ms
authorKyle Tso <kyletso@google.com>
Fri, 28 May 2021 08:16:13 +0000 (16:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jun 2021 10:01:41 +0000 (12:01 +0200)
commitb452e8bb7c525fbecc69aef44b0721d2ece032bc
tree50bb3a000fa317a5affc5d0f4bd1a961fc7eaf48
parent0ff5f83ae147e63c297e0a5515c9c271b7448f6f
usb: pd: Set PD_T_SINK_WAIT_CAP to 310ms

commit 6490fa565534fa83593278267785a694fd378a2b upstream.

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)")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Kyle Tso <kyletso@google.com>
Link: https://lore.kernel.org/r/20210528081613.730661-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/usb/pd.h