Skip to contentSkip to conversation

Revert "usb: typec: tcpm: reset counter when enter into unattached state after try role"

PATCH In review Ondřej Jirman 2 participants 2 messages Feb 17, 2024 – Feb 26, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "usb: typec: tcpm: reset counter when enter into unattached state after try role"

From: Ondrej Jirman <[email protected]>

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 2d6d80127006ae3da26b1f21a65eccf957f2d1e5.

Fixes 2d6d80127006 ("usb: typec: tcpm: reset counter when enter into unattached state after try role")
---
 drivers/usb/typec/tcpm/tcpm.c | 3 ---
 1 file changed, 3 deletions(-)

See https://lore.kernel.org/all/odggrbbgjpardze76qiv57mw6tllisyu5sbrta37iadjzwamcv@qr3ubwnlzqqt/
for more.

drivers/usb/typec/tcpm/tcpm.c +0 -3
index f7d7daa60c8d..295ae7eb912c 100644
@@ -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;
 
Signature · 1 line
2.43.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Ondřej Jirman

From: Ondrej Jirman <[email protected]>

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.

Quoted 5 lines

This reverts commit 2d6d80127006ae3da26b1f21a65eccf957f2d1e5.

Fixes 2d6d80127006 ("usb: typec: tcpm: reset counter when enter into unattached state after try role")
Quoted 23 lines
---
 drivers/usb/typec/tcpm/tcpm.c | 3 ---
 1 file changed, 3 deletions(-)

See https://lore.kernel.org/all/odggrbbgjpardze76qiv57mw6tllisyu5sbrta37iadjzwamcv@qr3ubwnlzqqt/
for more.

drivers/usb/typec/tcpm/tcpm.c +0 -3
index f7d7daa60c8d..295ae7eb912c 100644
@@ -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;
 
Signature · 1 line
2.43.0
Signature · 1 line
heikki