lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YL3k0aot51j3ntNY@kuha.fi.intel.com>
Date:   Mon, 7 Jun 2021 12:20:17 +0300
From:   Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:     Kyle Tso <kyletso@...gle.com>
Cc:     linux@...ck-us.net, gregkh@...uxfoundation.org, badhri@...gle.com,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: typec: tcpm: Do not finish VDM AMS for retrying
 Responses

On Sun, Jun 06, 2021 at 04:14:52PM +0800, Kyle Tso wrote:
> If the VDM responses couldn't be sent successfully, it doesn't need to
> finish the AMS until the retry count reaches the limit.
> 
> Fixes: 0908c5aca31e ("usb: typec: tcpm: AMS and Collision Avoidance")
> Signed-off-by: Kyle Tso <kyletso@...gle.com>

Acked-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>

> ---
>  drivers/usb/typec/tcpm/tcpm.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 0db685d5d9c0..08fabe1fc31d 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -1965,6 +1965,9 @@ static void vdm_run_state_machine(struct tcpm_port *port)
>  			tcpm_log(port, "VDM Tx error, retry");
>  			port->vdm_retries++;
>  			port->vdm_state = VDM_STATE_READY;
> +			if (PD_VDO_SVDM(vdo_hdr) && PD_VDO_CMDT(vdo_hdr) == CMDT_INIT)
> +				tcpm_ams_finish(port);
> +		} else {
>  			tcpm_ams_finish(port);
>  		}
>  		break;
> -- 
> 2.32.0.rc1.229.g3e70b5a671-goog

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ