thunderbolt: debugfs: Use DEBUGFS_MODE with path config space access
Subsystems (2)
PATCH 1/2 thunderbolt: debugfs: Use DEBUGFS_MODE with path config space access
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.
--- drivers/thunderbolt/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thunderbolt/debugfs.c +1 -1
@@ -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,
Signature · 1 line
2.50.1
PATCH 2/2 thunderbolt: Return -ETIMEDOUT if XDomain peer returns ERROR_NOT_READY
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.
--- drivers/thunderbolt/xdomain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/thunderbolt/xdomain.c +4 -4
@@ -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);
Signature · 1 line
2.50.1
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 7 lines
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 viaDEBUGFS_MODE.Fixes 398da8e64321 ("thunderbolt: debugfs: Add write capability to path config space")Signed-off-by Mika Westerberg <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
[email protected]
AI reviewRe: [PATCH 2/2] thunderbolt: Return -ETIMEDOUT if XDomain peer returns ERROR_NOT_READY
In reply to Mika WesterbergSashiko has reviewed this patch and found no issues.
Quoted 9 lines
The XDomain protocol retries the message when it gets
-EAGAINfrom the handler. However, this also happens if the remote peer replies withERROR_NOT_READYastb_xdp_handle_error()also returns-EAGAIN. This can lead to infinite retry loop. Fix this by returning-ETIMEDOUTin that case.Fixes 8e1de7042596 ("thunderbolt: Add support for XDomain lane bonding")Signed-off-by Mika Westerberg <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Mika Westerberg
AppliedRe: [PATCH 2/2] thunderbolt: Return -ETIMEDOUT if XDomain peer returns ERROR_NOT_READY
In reply to Mika WesterbergQuoted 9 lines · Mika Westerberg
The XDomain protocol retries the message when it gets
-EAGAINfrom the handler. However, this also happens if the remote peer replies withERROR_NOT_READYastb_xdp_handle_error()also returns-EAGAIN. This can lead to infinite retry loop. Fix this by returning-ETIMEDOUTin that case.Fixes 8e1de7042596 ("thunderbolt: Add support for XDomain lane bonding")Signed-off-by Mika Westerberg <[email protected]>
Applied to thunderbolt.git/fixes.
Mika Westerberg
AppliedQuoted 7 lines · 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 viaDEBUGFS_MODE.Fixes 398da8e64321 ("thunderbolt: debugfs: Add write capability to path config space")Signed-off-by Mika Westerberg <[email protected]>
Applied to thunderbolt.git/next.