* [PATCH] thunderbolt: Use correct error code with ERROR_NOT_SUPPORTED
@ 2024-04-15 6:55 Mika Westerberg
2024-04-19 5:03 ` Mika Westerberg
0 siblings, 1 reply; 2+ messages in thread
From: Mika Westerberg @ 2024-04-15 6:55 UTC (permalink / raw)
To: linux-usb
Cc: Yehezkel Bernat, Michael Jamet, Lukas Wunner, Andreas Noever,
Mika Westerberg
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>
---
drivers/thunderbolt/xdomain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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:
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] thunderbolt: Use correct error code with ERROR_NOT_SUPPORTED
2024-04-15 6:55 [PATCH] thunderbolt: Use correct error code with ERROR_NOT_SUPPORTED Mika Westerberg
@ 2024-04-19 5:03 ` Mika Westerberg
0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2024-04-19 5:03 UTC (permalink / raw)
To: linux-usb; +Cc: Yehezkel Bernat, Michael Jamet, Lukas Wunner, Andreas Noever
On Mon, Apr 15, 2024 at 09:55:28AM +0300, Mika Westerberg wrote:
> 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>
Applied to thunderbolt.git/next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-19 5:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15 6:55 [PATCH] thunderbolt: Use correct error code with ERROR_NOT_SUPPORTED Mika Westerberg
2024-04-19 5:03 ` Mika Westerberg
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.