diff mbox series

net/mlx5/linux: fix missing firmware version copying

Message ID 20210205090045.12047-1-xvojan00@stud.fit.vutbr.cz (mailing list archive)
State New
Delegated to: Raslan Darawsheh
Headers show
Series net/mlx5/linux: fix missing firmware version copying | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing warning Testing issues
ci/travis-robot warning Travis build: failed
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Kamil Vojanec Feb. 5, 2021, 9 a.m. UTC
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.

Signed-off-by: Kamil Vojanec <xvojan00@stud.fit.vutbr.cz>
---
 drivers/net/mlx5/linux/mlx5_os.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Matan Azrad May 6, 2021, 9:34 a.m. UTC | #1
From: Kamil Vojanec
> 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.
> 
> Signed-off-by: Kamil Vojanec <xvojan00@stud.fit.vutbr.cz>
Acked-by: Matan Azrad <matan@nvidia.com>



> ---
>  drivers/net/mlx5/linux/mlx5_os.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/mlx5/linux/mlx5_os.c
> b/drivers/net/mlx5/linux/mlx5_os.c
> index a8cc5f311..fa35c06e7 100644
> --- a/drivers/net/mlx5/linux/mlx5_os.c
> +++ b/drivers/net/mlx5/linux/mlx5_os.c
> @@ -152,6 +152,7 @@ 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.17.1
diff mbox series

Patch

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index a8cc5f311..fa35c06e7 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -152,6 +152,7 @@  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;
 }