diff options
author | Ondrej Jirman <megi@xff.cz> | 2024-02-17 19:20:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-19 11:30:42 +0300 |
commit | 23b1d2d99b0f55326f05e7d757fa197c4a95dc5c (patch) | |
tree | 46217ff49b205440693acf7441622452514e759f /drivers/usb/typec/tcpm | |
parent | 858a74cb512833e276d96a72acb560ce8c138bec (diff) | |
download | linux-23b1d2d99b0f55326f05e7d757fa197c4a95dc5c.tar.xz |
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 2d6d80127006ae3da26b1f21a65eccf957f2d1e5.
Cc: stable@vger.kernel.org
Fixes: 2d6d80127006 ("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>
Diffstat (limited to 'drivers/usb/typec/tcpm')
-rw-r--r-- | drivers/usb/typec/tcpm/tcpm.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index f7d7daa60c8d..295ae7eb912c 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -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; |