From: Guenter Roeck <linux@roeck-us.net>
To: Badhri Jagan Sridharan <badhri@google.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] usb: typec: tcpm: PD3.0 sinks can send Discover Identity even in device mode
Date: Thu, 18 Mar 2021 07:55:18 -0700 [thread overview]
Message-ID: <3dbda4c3-f623-e52f-eb95-e7c0cc5ac498@roeck-us.net> (raw)
In-Reply-To: <20210318065604.3757307-1-badhri@google.com>
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@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-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;
> }
>
prev parent reply other threads:[~2021-03-18 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 6:56 Badhri Jagan Sridharan
2021-03-18 7:48 ` Heikki Krogerus
2021-03-18 14:55 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3dbda4c3-f623-e52f-eb95-e7c0cc5ac498@roeck-us.net \
--to=linux@roeck-us.net \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®