aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/bnxt/bnxt_re/ib_verbs.c5
-rw-r--r--sys/dev/irdma/irdma_kcompat.c2
-rw-r--r--sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c6
-rw-r--r--sys/dev/qlnx/qlnxr/qlnxr_verbs.c2
4 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.c b/sys/dev/bnxt/bnxt_re/ib_verbs.c
index 32899abab9ff..9e6887a7c6e1 100644
--- a/sys/dev/bnxt/bnxt_re/ib_verbs.c
+++ b/sys/dev/bnxt/bnxt_re/ib_verbs.c
@@ -241,7 +241,7 @@ int bnxt_re_modify_device(struct ib_device *ibdev,
return 0;
}
-static void __to_ib_speed_width(u32 espeed, u8 lanes, u8 *speed, u8 *width)
+static void __to_ib_speed_width(u32 espeed, u8 lanes, u16 *speed, u8 *width)
{
if (!lanes) {
switch (espeed) {
@@ -342,7 +342,8 @@ int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num,
{
struct bnxt_re_dev *rdev = to_bnxt_re_dev(ibdev, ibdev);
struct bnxt_qplib_dev_attr *dev_attr = rdev->dev_attr;
- u8 active_speed = 0, active_width = 0;
+ u16 active_speed = 0;
+ u8 active_width = 0;
dev_dbg(rdev_to_dev(rdev), "QUERY PORT with port_num 0x%x\n", port_num);
memset(port_attr, 0, sizeof(*port_attr));
diff --git a/sys/dev/irdma/irdma_kcompat.c b/sys/dev/irdma/irdma_kcompat.c
index 51f44133252c..4d02bd08ca65 100644
--- a/sys/dev/irdma/irdma_kcompat.c
+++ b/sys/dev/irdma/irdma_kcompat.c
@@ -1634,7 +1634,7 @@ irdma_query_port(struct ib_device *ibdev, u8 port,
props->state = IB_PORT_DOWN;
props->phys_state = IB_PORT_PHYS_STATE_DISABLED;
}
- ib_get_eth_speed(ibdev, port, (u16 *)& props->active_speed, &props->active_width);
+ ib_get_eth_speed(ibdev, port, &props->active_speed, &props->active_width);
if (rdma_protocol_roce(ibdev, 1)) {
props->gid_tbl_len = 32;
diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
index 5825cee87d9b..6ff4e55630d7 100644
--- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
+++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
@@ -155,7 +155,7 @@ static if_t mlx5_ib_get_netdev(struct ib_device *device,
return ndev;
}
-static int translate_eth_proto_oper(u32 eth_proto_oper, u8 *active_speed,
+static int translate_eth_proto_oper(u32 eth_proto_oper, u16 *active_speed,
u8 *active_width)
{
switch (eth_proto_oper) {
@@ -216,7 +216,7 @@ static int translate_eth_proto_oper(u32 eth_proto_oper, u8 *active_speed,
return 0;
}
-static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u8 *active_speed,
+static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed,
u8 *active_width)
{
switch (eth_proto_oper) {
@@ -969,7 +969,7 @@ static int mlx5_query_hca_port(struct ib_device *ibdev, u8 port,
if (err)
goto out;
- props->active_speed = (u8)ptys->ib_proto_oper;
+ props->active_speed = (u16)ptys->ib_proto_oper;
pmtu->local_port = port;
err = mlx5_core_access_pmtu(mdev, pmtu, 0);
diff --git a/sys/dev/qlnx/qlnxr/qlnxr_verbs.c b/sys/dev/qlnx/qlnxr/qlnxr_verbs.c
index d74f51831da7..f3a054c707c3 100644
--- a/sys/dev/qlnx/qlnxr/qlnxr_verbs.c
+++ b/sys/dev/qlnx/qlnxr/qlnxr_verbs.c
@@ -546,7 +546,7 @@ qlnxr_query_device(struct ib_device *ibdev, struct ib_device_attr *attr,
}
static inline void
-get_link_speed_and_width(int speed, uint8_t *ib_speed, uint8_t *ib_width)
+get_link_speed_and_width(int speed, uint16_t *ib_speed, uint8_t *ib_width)
{
switch (speed) {
case 1000: