[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BYAPR21MB127031948D2C6E22F8EC805ABF8A9@BYAPR21MB1270.namprd21.prod.outlook.com>
Date: Mon, 1 Nov 2021 06:07:22 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: Haiyang Zhang <haiyangz@...rosoft.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
"gustavoars@...nel.org" <gustavoars@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: KY Srinivasan <kys@...rosoft.com>,
"stephen@...workplumber.org" <stephen@...workplumber.org>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
Shachar Raindel <shacharr@...rosoft.com>,
Paul Rosswurm <paulros@...rosoft.com>,
"olaf@...fle.de" <olaf@...fle.de>, vkuznets <vkuznets@...hat.com>
Subject: RE: [PATCH net-next 2/4] net: mana: Report OS info to the PF driver
> From: Haiyang Zhang <haiyangz@...rosoft.com>
> Sent: Saturday, October 30, 2021 8:36 AM
> > @@ -848,6 +850,15 @@ int mana_gd_verify_vf_version(struct pci_dev
> *pdev)
> > req.gd_drv_cap_flags3 = GDMA_DRV_CAP_FLAGS3;
> > req.gd_drv_cap_flags4 = GDMA_DRV_CAP_FLAGS4;
> >
> > + req.drv_ver = 0; /* Unused*/
> > + req.os_type = 0x10; /* Linux */
>
> Instead of a magic number, could you define it as a macro?
>
> Other parts look fine.
>
> Reviewed-by: Haiyang Zhang <haiyangz@...rosoft.com>
Ok, I'll apply the below change in v2.
@@ -497,6 +497,7 @@ enum {
#define GDMA_DRV_CAP_FLAGS4 0
+#define GDMA_OS_TYPE_LINUX 0x10
struct gdma_verify_ver_req {
struct gdma_req_hdr hdr;
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index c96ac81212f7..bea218c5c043 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -851,7 +851,7 @@ int mana_gd_verify_vf_version(struct pci_dev *pdev)
req.gd_drv_cap_flags4 = GDMA_DRV_CAP_FLAGS4;
req.drv_ver = 0; /* Unused*/
- req.os_type = 0x10; /* Linux */
+ req.os_type = GDMA_OS_TYPE_LINUX;
req.os_ver_major = LINUX_VERSION_MAJOR;
req.os_ver_minor = LINUX_VERSION_PATCHLEVEL;
req.os_ver_build = LINUX_VERSION_SUBLEVEL;
Powered by blists - more mailing lists