From 520e3f4888c508dad32da1d8c5486a7be9b0fbba Mon Sep 17 00:00:00 2001 From: Kamil Vojanec Date: Fri, 5 Feb 2021 10:00:45 +0100 Subject: [PATCH] net/mlx5/linux: fix firmware version This patch fixes a bug where firmware version was not copied from ibv_device_attr structure into mlx5_dev_attr structure, resulting in inability to read firmware version. Fixes: e85f623e13ea ("net/mlx5: remove attributes dependency on Verbs") Cc: stable@dpdk.org Signed-off-by: Kamil Vojanec Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 6325607cdb..41b3e076a1 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -154,6 +154,8 @@ mlx5_os_get_dev_attr(void *ctx, struct mlx5_dev_attr *device_attr) #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT device_attr->tunnel_offloads_caps = dv_attr.tunnel_offloads_caps; #endif + strlcpy(device_attr->fw_ver, attr_ex.orig_attr.fw_ver, + sizeof(device_attr->fw_ver)); return err; } -- 2.20.1