diff options
author | hselasky <hselasky@FreeBSD.org> | 2018-03-26 20:10:49 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2018-03-26 20:10:49 +0000 |
commit | 9c41839f2760720e8676a42551d727d7e7c67ef3 (patch) | |
tree | 406a3614e6ad0c63601639f0e696a7111ecb4d09 /sys/dev/mlx5/mlx5_en/mlx5_en_main.c | |
parent | b90536a91966c28a3c0d92eb9ad95b38721070fe (diff) | |
download | FreeBSD-src-9c41839f2760720e8676a42551d727d7e7c67ef3.zip FreeBSD-src-9c41839f2760720e8676a42551d727d7e7c67ef3.tar.gz |
MFC r330604:
Add log message for unsupported QSFPs in mlx5core.
Submitted by: Matthew Finlay <matt@mellanox.com>
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/dev/mlx5/mlx5_en/mlx5_en_main.c')
-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; } |