From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: zhangjianrong <zhangjianrong5@huawei.com>
Cc: andreas.noever@gmail.com, michael.jamet@intel.com,
YehezkelShB@gmail.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, guhengsheng@hisilicon.com,
caiyadong@huawei.com, xuetao09@huawei.com,
lixinghang1@huawei.com
Subject: Re: [PATCH] thunderbolt: Process xdomain response packets synchronously
Date: Wed, 25 Jun 2025 09:40:06 +0300 [thread overview]
Message-ID: <20250625064006.GE2824380@black.fi.intel.com> (raw)
In-Reply-To: <20250625062505.1596787-1-zhangjianrong5@huawei.com>
On Wed, Jun 25, 2025 at 02:25:05PM +0800, zhangjianrong wrote:
> Xdomain response packets don't belong to async event. It seems
> no harm now but better to be fixed.
It seems odd but the protocol actually uses RESP packets also with requests
(probably a typo in the original specs but this is what Apple also
implemented so we need to support it). So we need to deal with them.
Did you try if this patch works against macOS for example?
>
> Signed-off-by: zhangjianrong <zhangjianrong5@huawei.com>
> ---
> drivers/thunderbolt/ctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c
> index 4bdb2d45e0bf..1873b64caf7c 100644
> --- a/drivers/thunderbolt/ctl.c
> +++ b/drivers/thunderbolt/ctl.c
> @@ -461,6 +461,7 @@ static void tb_ctl_rx_callback(struct tb_ring *ring, struct ring_frame *frame,
> case TB_CFG_PKG_ERROR:
> case TB_CFG_PKG_OVERRIDE:
> case TB_CFG_PKG_RESET:
> + case TB_CFG_PKG_XDOMAIN_RESP:
> if (*(__be32 *)(pkg->buffer + frame->size) != crc32) {
> tb_ctl_err(pkg->ctl,
> "RX: checksum mismatch, dropping packet\n");
> @@ -474,7 +475,6 @@ static void tb_ctl_rx_callback(struct tb_ring *ring, struct ring_frame *frame,
> break;
>
> case TB_CFG_PKG_EVENT:
> - case TB_CFG_PKG_XDOMAIN_RESP:
> case TB_CFG_PKG_XDOMAIN_REQ:
> if (*(__be32 *)(pkg->buffer + frame->size) != crc32) {
> tb_ctl_err(pkg->ctl,
> --
> 2.34.1
prev parent reply other threads:[~2025-06-25 6:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 6:25 [PATCH] thunderbolt: Process xdomain response packets synchronously zhangjianrong
2025-06-25 6:40 ` Mika Westerberg [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=20250625064006.GE2824380@black.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=caiyadong@huawei.com \
--cc=guhengsheng@hisilicon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lixinghang1@huawei.com \
--cc=michael.jamet@intel.com \
--cc=xuetao09@huawei.com \
--cc=zhangjianrong5@huawei.com \
/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