All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: memoriaru@foxmail.com
Cc: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org,
	badhri@google.com, stable@vger.kernel.org
Subject: Re: [PATCH usb v4] usb: typec: tcpm: exempt Soft Reset from the SOP' MessageID duplicate check
Date: Sat, 21 Nov 2026 10:16:52 +0100	[thread overview]
Message-ID: <2026112138-turban-cornbread-efa1@gregkh> (raw)
In-Reply-To: <tencent_D1222948818CA62395FED66DB7F2967B1809@qq.com>

On Sat, Nov 21, 2026 at 03:25:35AM +0800, memoriaru@foxmail.com wrote:
> From: Zhang Hewei <memoriaru@foxmail.com>
> 
> The PD message duplicate-check and the SOFT_RESET state handling treat
> the SOP and SOP' channels differently:
> 
> tcpm_pd_rx_handler() exempts PD_CTRL_SOFT_RESET from the MessageID
> duplicate check on the SOP path (USB PD spec 6.6.1.2 note: a Soft_Reset
> message always carries MessageID zero, so the duplicate check must not
> drop it), but the SOP' branch of the same switch has no such exemption.
> A cable that sends a second Soft Reset over SOP' (MessageID zero again)
> has that message silently dropped by the rx_msgid_prime comparison, and
> the cable-side re-negotiation stalls.
> 
> Exempt Soft Reset on the SOP' path the same way the SOP path does.
> 
> Found by code inspection; a software TCPC stub was built for the
> responder path.
> 
> Fixes: 6bd181ba60e1 ("usb: typec: tcpm: add control message support to sop'")
> Cc: stable@vger.kernel.org
> Signed-off-by: Zhang Hewei <memoriaru@foxmail.com>
> 
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index bb90211..89e280b 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -4200,7 +4200,8 @@ static void tcpm_pd_rx_handler(struct kthread_work *work)
>  		 */
>  		switch (rx_sop_type) {
>  		case TCPC_TX_SOP_PRIME:
> -			if (msgid == port->rx_msgid_prime)
> +			if (msgid == port->rx_msgid_prime &&
> +			    type != PD_CTRL_SOFT_RESET)
>  				goto done;
>  			port->rx_msgid_prime = msgid;
>  			break;
> -- 
> 2.39.5 (Apple Git-154)
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/process/submitting-patches.rst for what
  needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

      parent reply	other threads:[~2026-11-21  9:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 22:20 [PATCH usb] usb: typec: tcpm: align SOP' Soft Reset handling with SOP memoriaru
2026-11-17 11:27 ` Heikki Krogerus
2026-11-17 11:36   ` [PATCH usb v2] " memoriaru
2026-11-20 13:16     ` Heikki Krogerus
2026-11-20 18:34       ` memoriaru
2026-11-20 18:43         ` sashiko-bot
2026-11-20 19:25       ` memoriaru
     [not found]       ` <1795204200.cover.tcpm-v4@foxmail.com>
2026-11-20 19:25         ` [PATCH usb v4] usb: typec: tcpm: exempt Soft Reset from the SOP' MessageID duplicate check memoriaru
2026-11-20 19:41           ` sashiko-bot
2026-11-21  9:16           ` Greg KH [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=2026112138-turban-cornbread-efa1@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=badhri@google.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=memoriaru@foxmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.