Blame SOURCES/0027-netdrv-bnxt_en-Device-serial-number-is-supported-onl.patch

f95c89
From 620cc08cb52bfe54049e69c56c7d75ba7b67ce26 Mon Sep 17 00:00:00 2001
f95c89
From: Jonathan Toppins <jtoppins@redhat.com>
f95c89
Date: Wed, 2 Oct 2019 18:22:42 -0400
f95c89
Subject: [PATCH 27/96] [netdrv] bnxt_en: Device serial number is supported
f95c89
 only for PFs
f95c89
f95c89
Message-id: <42a558146846b42a704f96b91b13e688f5533fb9.1570027456.git.jtoppins@redhat.com>
f95c89
Patchwork-id: 276442
f95c89
O-Subject: [RHEL-8.2 PATCH 20/78] bnxt_en: Device serial number is supported only for PFs.
f95c89
Bugzilla: 1724766
f95c89
RH-Acked-by: John Linville <linville@redhat.com>
f95c89
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
f95c89
f95c89
Don't read DSN on VFs that do not have the PCI capability.
f95c89
f95c89
Fixes: 03213a996531 ("bnxt: move bp->switch_id initialization to PF probe")
f95c89
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
f95c89
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
f95c89
Signed-off-by: David S. Miller <davem@davemloft.net>
f95c89
(cherry picked from commit 2e9217d1e8b72dde2c7e3e2338cc1830f68cb58d)
f95c89
Bugzilla: 1724766
f95c89
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23809532
f95c89
Tested: build, boot, basic ping
f95c89
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
f95c89
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
f95c89
---
f95c89
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 ++++++-----
f95c89
 1 file changed, 6 insertions(+), 5 deletions(-)
f95c89
f95c89
Index: src/drivers/net/ethernet/broadcom/bnxt/bnxt.c
f95c89
===================================================================
f95c89
--- src.orig/drivers/net/ethernet/broadcom/bnxt/bnxt.c	2020-02-06 16:23:13.805530638 +0100
f95c89
+++ src/drivers/net/ethernet/broadcom/bnxt/bnxt.c	2020-02-06 16:23:13.941529390 +0100
f95c89
@@ -10744,11 +10744,12 @@
f95c89
 		goto init_err_pci_clean;
f95c89
 	}
f95c89
 
f95c89
-	/* Read the adapter's DSN to use as the eswitch switch_id */
f95c89
-	rc = bnxt_pcie_dsn_get(bp, bp->switch_id);
f95c89
-	if (rc)
f95c89
-		goto init_err_pci_clean;
f95c89
-
f95c89
+	if (BNXT_PF(bp)) {
f95c89
+		/* Read the adapter's DSN to use as the eswitch switch_id */
f95c89
+		rc = bnxt_pcie_dsn_get(bp, bp->switch_id);
f95c89
+		if (rc)
f95c89
+			goto init_err_pci_clean;
f95c89
+	}
f95c89
 	bnxt_hwrm_func_qcfg(bp);
f95c89
 	bnxt_hwrm_vnic_qcaps(bp);
f95c89
 	bnxt_hwrm_port_led_qcaps(bp);