diff options
Diffstat (limited to 'sys/dev/mlx5/mlx5_en')
-rw-r--r-- | sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 8a72d0d..dc3466e 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2534,6 +2534,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data) int error = 0; int mask = 0; int size_read = 0; + int module_status; int module_num; int max_mtu; uint8_t read_addr; @@ -2723,8 +2724,9 @@ out: goto err_i2c; } /* Check if module is present before doing an access */ - if (mlx5_query_module_status(priv->mdev, module_num) != - MLX5_MODULE_STATUS_PLUGGED) { + module_status = mlx5_query_module_status(priv->mdev, module_num); + if (module_status != MLX5_MODULE_STATUS_PLUGGED_ENABLED && + module_status != MLX5_MODULE_STATUS_PLUGGED_DISABLED) { error = EINVAL; goto err_i2c; } |