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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YKt+bbgOVi/3RCpQ@kuha.fi.intel.com>
Date:   Mon, 24 May 2021 13:22:37 +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,
        lkp@...el.com
Subject: Re: [PATCH v2 2/2] usb: typec: tcpm: Respond Not_Supported if no
 snk_vdo

On Sun, May 23, 2021 at 09:58:55AM +0800, Kyle Tso wrote:
> If snk_vdo is not populated from fwnode, it implies the port does not
> support responding to SVDM commands. Not_Supported Message shall be sent
> if the contract is in PD3. And for PD2, the port shall ignore the
> commands.
> 
> Fixes: 193a68011fdc ("staging: typec: tcpm: Respond to Discover Identity commands")
> Signed-off-by: Kyle Tso <kyletso@...gle.com>
> Reviewed-by: Guenter Roeck <linux@...ck-us.net>

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

> ---
>  drivers/usb/typec/tcpm/tcpm.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 7db6ae3e9c0b..a56bc71f4eb5 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -2458,7 +2458,10 @@ static void tcpm_pd_data_request(struct tcpm_port *port,
>  					   NONE_AMS);
>  		break;
>  	case PD_DATA_VENDOR_DEF:
> -		tcpm_handle_vdm_request(port, msg->payload, cnt);
> +		if (tcpm_vdm_ams(port) || port->nr_snk_vdo)
> +			tcpm_handle_vdm_request(port, msg->payload, cnt);
> +		else if (port->negotiated_rev > PD_REV20)
> +			tcpm_pd_handle_msg(port, PD_MSG_CTRL_NOT_SUPP, NONE_AMS);
>  		break;
>  	case PD_DATA_BIST:
>  		port->bist_request = le32_to_cpu(msg->payload[0]);
> -- 
> 2.31.1.818.g46aad6cb9e-goog

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ