Skip to content

Commit

Permalink
Revert "usb: typec: tcpm: reset counter when enter into unattached st…
Browse files Browse the repository at this point in the history
…ate after try role"

The reverted commit makes the state machine only ever go from SRC_ATTACH_WAIT
to SNK_TRY in endless loop when toggling. After revert it goes to SRC_ATTACHED
after initially trying SNK_TRY earlier, as it should for toggling to ever detect
the power source mode and the port is again able to provide power to attached
power sinks.

This reverts commit 2d6d801.

Cc: stable@vger.kernel.org
Fixes: 2d6d801 ("usb: typec: tcpm: reset counter when enter into unattached state after try role")
Signed-off-by: Ondrej Jirman <megi@xff.cz>
Link: https://lore.kernel.org/r/20240217162023.1719738-1-megi@xff.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ondrej Jirman authored and Greg Kroah-Hartman committed Feb 19, 2024
1 parent 858a74c commit 23b1d2d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/usb/typec/tcpm/tcpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3743,9 +3743,6 @@ static void tcpm_detach(struct tcpm_port *port)
if (tcpm_port_is_disconnected(port))
port->hard_reset_count = 0;

port->try_src_count = 0;
port->try_snk_count = 0;

if (!port->attached)
return;

Expand Down

0 comments on commit 23b1d2d

Please sign in to comment.