MLK-16013-30 staging: typec: Reset hard_reset_count to be 0 after send source cap
authorLi Jun <jun.li@nxp.com>
Fri, 28 Jul 2017 09:11:12 +0000 (17:11 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:21 +0000 (15:36 -0500)
Per standard, we should clear the hard reset count to be 0 after souce
sent the source cap.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
drivers/staging/typec/tcpm.c

index 9ec07ce..b2480d8 100644 (file)
@@ -2267,12 +2267,7 @@ static void run_state_machine(struct tcpm_port *port)
                        tcpm_set_state(port, SRC_SEND_CAPABILITIES,
                                       PD_T_SEND_SOURCE_CAP);
                } else {
-                       /*
-                        * Per standard, we should clear the reset counter here.
-                        * However, that can result in state machine hang-ups.
-                        * Reset it only in READY state to improve stability.
-                        */
-                       /* port->hard_reset_count = 0; */
+                       port->hard_reset_count = 0;
                        port->caps_count = 0;
                        port->pd_capable = true;
                        hrtimer_start(&port->snd_res_timer,