git: 676f29c1333d - stable/12 - e1000: support flashless i211 PBA

Kevin Bowling kbowling at FreeBSD.org
Fri Sep 24 01:41:29 UTC 2021


The branch stable/12 has been updated by kbowling (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=676f29c1333dd0f141335e5f0ce8fa416734c921

commit 676f29c1333dd0f141335e5f0ce8fa416734c921
Author:     Guinan Sun <guinanx.sun at intel.com>
AuthorDate: 2020-07-06 08:11:59 +0000
Commit:     Kevin Bowling <kbowling at FreeBSD.org>
CommitDate: 2021-09-24 01:38:38 +0000

    e1000: support flashless i211 PBA
    
    Add support to print PBA when using flashless.
    
    Signed-off-by: Todd Fujinaka <todd.fujinaka at intel.com>
    Signed-off-by: Sasha Neftin <sasha.neftin at intel.com>
    Signed-off-by: Guinan Sun <guinanx.sun at intel.com>
    Reviewed-by: Wei Zhao <wei.zhao1 at intel.com>
    
    Approved by:    imp
    Obtained from:  DPDK (d3c41d90dfd5b39dec14c74cf53086f4e6634aed)
    MFC after:      1 week
    
    (cherry picked from commit de0ae5d1cb896dbc04c5334ef0b864b3c841c3ce)
---
 sys/dev/e1000/e1000_82575.c | 2 +-
 sys/dev/e1000/e1000_nvm.c   | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sys/dev/e1000/e1000_82575.c b/sys/dev/e1000/e1000_82575.c
index d588539ca8e8..27e564d7841b 100644
--- a/sys/dev/e1000/e1000_82575.c
+++ b/sys/dev/e1000/e1000_82575.c
@@ -461,7 +461,7 @@ static s32 e1000_init_mac_params_82575(struct e1000_hw *hw)
 	if ((mac->type == e1000_i210) || (mac->type == e1000_i211))
 		mac->ops.init_hw = e1000_init_hw_i210;
 	else
-	mac->ops.init_hw = e1000_init_hw_82575;
+		mac->ops.init_hw = e1000_init_hw_82575;
 	/* link setup */
 	mac->ops.setup_link = e1000_setup_link_generic;
 	/* physical interface link setup */
diff --git a/sys/dev/e1000/e1000_nvm.c b/sys/dev/e1000/e1000_nvm.c
index 360c95aa8c69..d96ea3bf760a 100644
--- a/sys/dev/e1000/e1000_nvm.c
+++ b/sys/dev/e1000/e1000_nvm.c
@@ -776,8 +776,9 @@ s32 e1000_read_pba_string_generic(struct e1000_hw *hw, u8 *pba_num,
 
 	DEBUGFUNC("e1000_read_pba_string_generic");
 
-	if ((hw->mac.type >= e1000_i210) &&
-	    !e1000_get_flash_presence_i210(hw)) {
+	if ((hw->mac.type == e1000_i210 ||
+	     hw->mac.type == e1000_i211) &&
+	     !e1000_get_flash_presence_i210(hw)) {
 		DEBUGOUT("Flashless no PBA string\n");
 		return -E1000_ERR_NVM_PBA_SECTION;
 	}


More information about the dev-commits-src-all mailing list