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]
Date:   Thu, 18 Mar 2021 07:55:18 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Badhri Jagan Sridharan <badhri@...gle.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] usb: typec: tcpm: PD3.0 sinks can send Discover
 Identity even in device mode

On 3/17/21 11:56 PM, Badhri Jagan Sridharan wrote:
>>>From 6.4.4.2 Structured VDM:
> • Either Port May be an Initiator of Structured VDMs except for the Enter
> Mode and Exit Mode Commands which Shall only be initiated by the DFP."
> 
> The above implies that when PD3.0 link is established PD3.0 sinks
> can send out discover identity command/AMS once PD negotiation is done.
> This allows discovering identity for PD3.0 UFP ports as well.
> 
> Signed-off-by: Badhri Jagan Sridharan <badhri@...gle.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>  drivers/usb/typec/tcpm/tcpm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 11d0c40bc47d..410856ec1702 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -3653,8 +3653,8 @@ static inline enum tcpm_state unattached_state(struct tcpm_port *port)
>  
>  static void tcpm_check_send_discover(struct tcpm_port *port)
>  {
> -	if (port->data_role == TYPEC_HOST && port->send_discover &&
> -	    port->pd_capable)
> +	if ((port->data_role == TYPEC_HOST || port->negotiated_rev > PD_REV20) &&
> +	    port->send_discover && port->pd_capable)
>  		tcpm_send_vdm(port, USB_SID_PD, CMD_DISCOVER_IDENT, NULL, 0);
>  	port->send_discover = false;
>  }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ