Skip to content

Commit

Permalink
tcpmv2: pe: Add mux_set call following successful DATA_RESET
Browse files Browse the repository at this point in the history
This CL adds a call to set_usb_mux_with_current_data_role after
performing a successful DATA_RESET. This is being added to satisfy
6.3.14 Data_Reset Message, item #3:
If the Port was operating in [USB 3.2] or [USB4] reapply the port’s
Rx Terminations (see [USB 3.2]).

Without this call a mode entry attempt that is either not successful,
or rejected by the port partner would leave the USB3.x SS lanes
disconnected. This would also be the case following an Exit_Mode
request from the AP when DATA_RESET is supported.

BUG=b:260095516
BRANCH=none
TEST=using drivers.usbc_usb4_mode integration test to verify that the
mux ends up in the correct state following a DATA_RESET.

Signed-off-by: Scott Collyer <[email protected]>
Change-Id: I3b6f9d00beb5fcc5a68c44887bde03d22b61d3e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4040832
Tested-by: Scott Collyer <[email protected]>
Commit-Queue: Scott Collyer <[email protected]>
Code-Coverage: Zoss <[email protected]>
Reviewed-by: Abe Levkoy <[email protected]>
  • Loading branch information
scott-collyer authored and Chromeos LUCI committed Nov 28, 2022
1 parent 4dee64a commit cbacb3e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions common/usbc/usb_pe_drp_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -7686,8 +7686,7 @@ static void pe_ddr_perform_data_reset_run(int port)
* interpretations are mutually exclusive. Resolve that
* ambiguity and update this implementation.
*/
usb_mux_set(port, USB_PD_MUX_NONE, USB_SWITCH_DISCONNECT,
polarity_rm_dts(pd_get_polarity(port)));
set_usb_mux_with_current_data_role(port);
} else if (IS_ENABLED(CONFIG_USBC_VCONN) &&
PE_CHK_FLAG(port, PE_FLAGS_VCONN_SWAP_COMPLETE) &&
tc_is_vconn_src(port)) {
Expand Down

0 comments on commit cbacb3e

Please sign in to comment.