summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2024-04-10 15:47:51 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2024-04-19 06:52:38 +0200
commit668906cf88d5f0c6f124cf4d7d61c38693708681 (patch)
tree7ba9bd5fe815aa7ba4e15d1b99d9649229070f87 /drivers/thunderbolt
parentthunderbolt: Allow USB3 bandwidth to be lower than maximum supported (diff)
downloadlinux-668906cf88d5f0c6f124cf4d7d61c38693708681.tar.xz
linux-668906cf88d5f0c6f124cf4d7d61c38693708681.zip
thunderbolt: Use correct error code with ERROR_NOT_SUPPORTED
We check for -EOPNOTSUPP but tb_xdp_handle_error() translated it to -ENOTSUPP instead which is dealt as "transient" error and retried after a while. Fix this so that we bail out early when the other side clearly tells us it is does not support this. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/xdomain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c
index 940ae97987ff..11a50c86a1e4 100644
--- a/drivers/thunderbolt/xdomain.c
+++ b/drivers/thunderbolt/xdomain.c
@@ -250,7 +250,7 @@ static int tb_xdp_handle_error(const struct tb_xdp_error_response *res)
case ERROR_UNKNOWN_DOMAIN:
return -EIO;
case ERROR_NOT_SUPPORTED:
- return -ENOTSUPP;
+ return -EOPNOTSUPP;
case ERROR_NOT_READY:
return -EAGAIN;
default: