diff options
author | 2023-06-20 16:43:07 +0300 | |
---|---|---|
committer | 2023-06-23 12:27:33 -0700 | |
commit | 690ad62fc6e445cc371e625fe2016e62c3793a0f (patch) | |
tree | 4e2d589d8b03b9002c733aed71c265d1c633b8d1 /drivers/net/ethernet/mellanox/mlx5/core | |
parent | net/mlx5: Fix reserved at offset in hca_cap register (diff) | |
download | linux-690ad62fc6e445cc371e625fe2016e62c3793a0f.tar.gz linux-690ad62fc6e445cc371e625fe2016e62c3793a0f.tar.bz2 linux-690ad62fc6e445cc371e625fe2016e62c3793a0f.zip |
net/mlx5: Fix error code in mlx5_is_reset_now_capable()
The mlx5_is_reset_now_capable() function returns bool, not negative
error codes. So if fast teardown is not supported it should return
false instead of -EOPNOTSUPP.
Fixes: 92501fa6e421 ("net/mlx5: Ack on sync_reset_request only if PF can do reset_now")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c b/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c index 7af2b14ab5d8..fb7874da3caa 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c @@ -327,7 +327,7 @@ static bool mlx5_is_reset_now_capable(struct mlx5_core_dev *dev) if (!MLX5_CAP_GEN(dev, fast_teardown)) { mlx5_core_warn(dev, "fast teardown is not supported by firmware\n"); - return -EOPNOTSUPP; + return false; } err = pci_read_config_word(dev->pdev, PCI_DEVICE_ID, &dev_id); |