RE: [PATCH] igb: read PBA number from flash

2020-09-04 Thread Brown, Aaron F
> From: Gal Hammer 
> Sent: Saturday, August 29, 2020 10:45 PM
> To: linux-kernel@vger.kernel.org
> Cc: Kirsher, Jeffrey T ; David S . Miller
> ; Jakub Kicinski ; intel-wired-
> l...@lists.osuosl.org; net...@vger.kernel.org; Marcel Apfelbaum
> ; Gal Hammer 
> 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 
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
Tested-by: Aaron Brown 



[PATCH] igb: read PBA number from flash

2020-08-29 Thread Gal Hammer
Fixed flash presence check for 82576 controllers so the part
number string is read and displayed correctly.

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

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);
-- 
2.26.2