aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mlx5
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2021-06-16 13:01:39 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2021-07-12 12:22:31 +0000
commit4238b4a7a2cfe44e95f3553ff4a3f6f813fb81f5 (patch)
treeb71bc8603ac56dfbbd2585d654844d7dcf20fce5 /sys/dev/mlx5
parentd7d833e20ba33f5b9f3052a534af7ecdd602f152 (diff)
downloadsrc-4238b4a7a2cfe44e95f3553ff4a3f6f813fb81f5.tar.gz
src-4238b4a7a2cfe44e95f3553ff4a3f6f813fb81f5.zip
ibcore: Introduce ib_port_phys_state enum.
In order to improve readability, add ib_port_phys_state enum to replace the use of magic numbers. Linux commit: 72a7720fca37fec0daf295923f17ac5d88a613e1 MFC after: 1 week Reviewed by: kib Sponsored by: Mellanox Technologies // NVIDIA Networking
Diffstat (limited to 'sys/dev/mlx5')
-rw-r--r--sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
index b97d40ca8b99..d614ec048f60 100644
--- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
+++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
@@ -319,7 +319,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num,
props->max_msg_sz = 1 << MLX5_CAP_GEN(dev->mdev, log_max_msg);
props->pkey_tbl_len = 1;
props->state = IB_PORT_DOWN;
- props->phys_state = 3;
+ props->phys_state = IB_PORT_PHYS_STATE_DISABLED;
mlx5_query_nic_vport_qkey_viol_cntr(dev->mdev, &qkey_viol_cntr);
props->qkey_viol_cntr = qkey_viol_cntr;
@@ -331,7 +331,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num,
if (ndev->if_drv_flags & IFF_DRV_RUNNING &&
ndev->if_link_state == LINK_STATE_UP) {
props->state = IB_PORT_ACTIVE;
- props->phys_state = 5;
+ props->phys_state = IB_PORT_PHYS_STATE_LINK_UP;
}
ndev_ib_mtu = iboe_get_mtu(ndev->if_mtu);