From: Li Jun Date: Fri, 28 Jul 2017 09:11:12 +0000 (+0800) Subject: MLK-16013-30 staging: typec: Reset hard_reset_count to be 0 after send source cap X-Git-Tag: C0P2-H0.0--20200415~1903 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=7f2cfe9465ece13a61d0e8be66dde0d6debeae81;p=linux.git MLK-16013-30 staging: typec: Reset hard_reset_count to be 0 after send source cap Per standard, we should clear the hard reset count to be 0 after souce sent the source cap. Reviewed-by: Peter Chen Signed-off-by: Li Jun --- diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index 9ec07ce47373..b2480d8b8d6b 100644 --- a/drivers/staging/typec/tcpm.c +++ b/drivers/staging/typec/tcpm.c @@ -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,