public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: RD Babiera <rdbabiera@google.com>
Cc: badhri@google.com, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v1] usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition
Date: Wed, 30 Apr 2025 17:00:50 +0300	[thread overview]
Message-ID: <aBItEvvt3Pz-FLfD@kuha.fi.intel.com> (raw)
In-Reply-To: <20250429234703.3748506-2-rdbabiera@google.com>

On Tue, Apr 29, 2025 at 11:47:01PM +0000, RD Babiera wrote:
> This patch fixes Type-C Compliance Test TD 4.7.6 - Try.SNK DRP Connect
> SNKAS.
> 
> The compliance tester moves into SNK_UNATTACHED during toggling and
> expects the PUT to apply Rp after tPDDebounce of detection. If the port
> is in SNK_TRY_WAIT_DEBOUNCE, it will move into SRC_TRYWAIT immediately
> and apply Rp. This violates TD 4.7.5.V.3, where the tester confirms that
> the PUT attaches Rp after the transitions to Unattached.SNK for
> tPDDebounce.
> 
> Change the tcpm_set_state delay between SNK_TRY_WAIT_DEBOUNCE and
> SRC_TRYWAIT to tPDDebounce.
> 
> Fixes: a0a3e04e6b2c ("staging: typec: tcpm: Check for Rp for tPDDebounce")
> Cc: stable@vger.kernel.org
> Signed-off-by: RD Babiera <rdbabiera@google.com>
> Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/tcpm/tcpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 784fa23102f9..87d56ac4565d 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -6003,7 +6003,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
>  	case SNK_TRY_WAIT_DEBOUNCE:
>  		if (!tcpm_port_is_sink(port)) {
>  			port->max_wait = 0;
> -			tcpm_set_state(port, SRC_TRYWAIT, 0);
> +			tcpm_set_state(port, SRC_TRYWAIT, PD_T_PD_DEBOUNCE);
>  		}
>  		break;
>  	case SRC_TRY_WAIT:
> 
> base-commit: 615dca38c2eae55aff80050275931c87a812b48c
> -- 
> 2.49.0.967.g6a0df3ecc3-goog

-- 
heikki

      reply	other threads:[~2025-04-30 14:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 23:47 [PATCH v1] usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition RD Babiera
2025-04-30 14:00 ` Heikki Krogerus [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=aBItEvvt3Pz-FLfD@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=badhri@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rdbabiera@google.com \
    --cc=stable@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