diff mbox series

igb: read PBA number from flash

Message ID 20200830054529.3980-1-ghammer@redhat.com
State Accepted
Delegated to: Anthony Nguyen
Headers show
Series igb: read PBA number from flash | expand

Commit Message

Gal Hammer Aug. 30, 2020, 5:45 a.m. UTC
Fixed flash presence check for 82576 controllers so the part
number string is read and displayed correctly.

Signed-off-by: Gal Hammer <ghammer@redhat.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Brown, Aaron F Sept. 4, 2020, 8:21 p.m. UTC | #1
> From: Gal Hammer <ghammer@redhat.com>
> Sent: Saturday, August 29, 2020 10:45 PM
> To: linux-kernel@vger.kernel.org
> Cc: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; David S . Miller
> <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; Marcel Apfelbaum
> <mapfelba@redhat.com>; Gal Hammer <ghammer@redhat.com>
> Subject: [PATCH] igb: read PBA number from flash
> 
> Fixed flash presence check for 82576 controllers so the part
> number string is read and displayed correctly.
> 
> Signed-off-by: Gal Hammer <ghammer@redhat.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index d9c3a6b169f9..245e62b0a97e 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3388,7 +3388,9 @@  static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 			  "Width x1" : "unknown"), netdev->dev_addr);
 	}
 
-	if ((hw->mac.type >= e1000_i210 ||
+	if ((hw->mac.type == e1000_82576 &&
+	     rd32(E1000_EECD) & E1000_EECD_PRES) ||
+	    (hw->mac.type >= e1000_i210 ||
 	     igb_get_flash_presence_i210(hw))) {
 		ret_val = igb_read_part_string(hw, part_str,
 					       E1000_PBANUM_LENGTH);