igb: read PBA number from flash
authorGal Hammer <ghammer@redhat.com>
Sun, 30 Aug 2020 05:45:29 +0000 (08:45 +0300)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 28 Sep 2020 21:42:45 +0000 (14:42 -0700)
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>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igb/igb_main.c

index e53ed2d..368f950 100644 (file)
@@ -3532,7 +3532,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);