* [PATCH 1/2] thunderbolt: debugfs: Use DEBUGFS_MODE with path config space access
@ 2026-11-11 12:32 Mika Westerberg
2026-11-11 12:32 ` [PATCH 2/2] thunderbolt: Return -ETIMEDOUT if XDomain peer returns ERROR_NOT_READY Mika Westerberg
2026-11-11 12:42 ` [PATCH 1/2] thunderbolt: debugfs: Use DEBUGFS_MODE with path config space access sashiko-bot
0 siblings, 2 replies; 4+ messages in thread
From: Mika Westerberg @ 2026-11-11 12:32 UTC (permalink / raw)
To: linux-usb; +Cc: Yehezkel Bernat, Lukas Wunner, Andreas Noever, Mika Westerberg
Commit 398da8e64321 ("thunderbolt: debugfs: Add write capability to path
config space") added write support to path config spaces but forgot to
update the mode accordingly. This fixes it to use correct mode via
DEBUGFS_MODE.
Fixes: 398da8e64321 ("thunderbolt: debugfs: Add write capability to path config space")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/thunderbolt/debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thunderbolt/debugfs.c b/drivers/thunderbolt/debugfs.c
index 6a6875eb07ba..0d9f41a0f2cd 100644
--- a/drivers/thunderbolt/debugfs.c
+++ b/drivers/thunderbolt/debugfs.c
@@ -2519,7 +2519,7 @@ void tb_switch_debugfs_init(struct tb_switch *sw)
debugfs_dir = debugfs_create_dir(dir_name, sw->debugfs_dir);
debugfs_create_file("regs", DEBUGFS_MODE, debugfs_dir,
port, &port_regs_fops);
- debugfs_create_file("path", 0400, debugfs_dir, port,
+ debugfs_create_file("path", DEBUGFS_MODE, debugfs_dir, port,
&path_fops);
if (port->config.counters_support)
debugfs_create_file("counters", 0600, debugfs_dir, port,
--
2.50.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] thunderbolt: Return -ETIMEDOUT if XDomain peer returns ERROR_NOT_READY
2026-11-11 12:32 [PATCH 1/2] thunderbolt: debugfs: Use DEBUGFS_MODE with path config space access Mika Westerberg
@ 2026-11-11 12:32 ` Mika Westerberg
2026-11-11 12:45 ` sashiko-bot
2026-11-11 12:42 ` [PATCH 1/2] thunderbolt: debugfs: Use DEBUGFS_MODE with path config space access sashiko-bot
1 sibling, 1 reply; 4+ messages in thread
From: Mika Westerberg @ 2026-11-11 12:32 UTC (permalink / raw)
To: linux-usb; +Cc: Yehezkel Bernat, Lukas Wunner, Andreas Noever, Mika Westerberg
The XDomain protocol retries the message when it gets -EAGAIN from the
handler. However, this also happens if the remote peer replies with
ERROR_NOT_READY as tb_xdp_handle_error() also returns -EAGAIN. This can
lead to infinite retry loop. Fix this by returning -ETIMEDOUT in that
case.
Cc: stable@vger.kernel.org
Fixes: 8e1de7042596 ("thunderbolt: Add support for XDomain lane bonding")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/thunderbolt/xdomain.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c
index 45e26833c953..e5a962537920 100644
--- a/drivers/thunderbolt/xdomain.c
+++ b/drivers/thunderbolt/xdomain.c
@@ -1370,7 +1370,7 @@ static int tb_xdomain_get_uuid(struct tb_xdomain *xd)
return -EAGAIN;
}
dev_dbg(&xd->dev, "failed to read remote UUID\n");
- return ret;
+ return ret != -EAGAIN ? ret : -ETIMEDOUT;
}
dev_dbg(&xd->dev, "got remote UUID %pUb\n", &uuid);
@@ -1425,7 +1425,7 @@ static int tb_xdomain_get_link_status(struct tb_xdomain *xd)
return -EAGAIN;
}
dev_dbg(&xd->dev, "failed to receive remote link status\n");
- return ret;
+ return ret != -EAGAIN ? ret : -ETIMEDOUT;
}
dev_dbg(&xd->dev, "remote link supports width %#x speed %#x\n", slw, sls);
@@ -1472,7 +1472,7 @@ static int tb_xdomain_link_state_change(struct tb_xdomain *xd,
return -EAGAIN;
}
dev_err(&xd->dev, "failed request link state change, aborting\n");
- return ret;
+ return ret != -EAGAIN ? ret : -ETIMEDOUT;
}
dev_dbg(&xd->dev, "received link state change response\n");
@@ -1564,7 +1564,7 @@ static int tb_xdomain_get_properties(struct tb_xdomain *xd)
dev_err(&xd->dev, "failed read XDomain properties from %pUb\n",
xd->remote_uuid);
- return ret;
+ return ret != -EAGAIN ? ret : -ETIMEDOUT;
}
mutex_lock(&xd->lock);
--
2.50.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] thunderbolt: debugfs: Use DEBUGFS_MODE with path config space access
2026-11-11 12:32 [PATCH 1/2] thunderbolt: debugfs: Use DEBUGFS_MODE with path config space access Mika Westerberg
2026-11-11 12:32 ` [PATCH 2/2] thunderbolt: Return -ETIMEDOUT if XDomain peer returns ERROR_NOT_READY Mika Westerberg
@ 2026-11-11 12:42 ` sashiko-bot
1 sibling, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-11 12:42 UTC (permalink / raw)
To: Mika Westerberg, linux-usb
> Commit 398da8e64321 ("thunderbolt: debugfs: Add write capability to path
> config space") added write support to path config spaces but forgot to
> update the mode accordingly. This fixes it to use correct mode via
> DEBUGFS_MODE.
>
> Fixes: 398da8e64321 ("thunderbolt: debugfs: Add write capability to path config space")
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111123248.1312997-1-mika.westerberg@linux.intel.com?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] thunderbolt: Return -ETIMEDOUT if XDomain peer returns ERROR_NOT_READY
2026-11-11 12:32 ` [PATCH 2/2] thunderbolt: Return -ETIMEDOUT if XDomain peer returns ERROR_NOT_READY Mika Westerberg
@ 2026-11-11 12:45 ` sashiko-bot
0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-11 12:45 UTC (permalink / raw)
To: Mika Westerberg, linux-usb
> The XDomain protocol retries the message when it gets -EAGAIN from the
> handler. However, this also happens if the remote peer replies with
> ERROR_NOT_READY as tb_xdp_handle_error() also returns -EAGAIN. This can
> lead to infinite retry loop. Fix this by returning -ETIMEDOUT in that
> case.
>
> Cc: stable@vger.kernel.org
> Fixes: 8e1de7042596 ("thunderbolt: Add support for XDomain lane bonding")
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111123248.1312997-1-mika.westerberg@linux.intel.com?part=2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-11 12:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 12:32 [PATCH 1/2] thunderbolt: debugfs: Use DEBUGFS_MODE with path config space access Mika Westerberg
2026-11-11 12:32 ` [PATCH 2/2] thunderbolt: Return -ETIMEDOUT if XDomain peer returns ERROR_NOT_READY Mika Westerberg
2026-11-11 12:45 ` sashiko-bot
2026-11-11 12:42 ` [PATCH 1/2] thunderbolt: debugfs: Use DEBUGFS_MODE with path config space access sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox