Skip to content

Commit 23b1d2d

Browse files
Ondrej Jirmangregkh
authored andcommitted
Revert "usb: typec: tcpm: reset counter when enter into unattached state 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>
1 parent 858a74c commit 23b1d2d

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/usb/typec/tcpm/tcpm.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3743,9 +3743,6 @@ static void tcpm_detach(struct tcpm_port *port)
37433743
if (tcpm_port_is_disconnected(port))
37443744
port->hard_reset_count = 0;
37453745

3746-
port->try_src_count = 0;
3747-
port->try_snk_count = 0;
3748-
37493746
if (!port->attached)
37503747
return;
37513748

0 commit comments

Comments
 (0)