thunderbolt: Use correct error code with ERROR_NOT_SUPPORTED
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 10 Apr 2024 13:47:51 +0000 (16:47 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 19 Apr 2024 04:52:38 +0000 (07:52 +0300)
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

index 940ae97987ff3821ee312a6c1603cbea9d7b231f..11a50c86a1e4302968f44dafeab47977bac01dd5 100644 (file)
@@ -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: