git: fce4d00876e8 - stable/14 - ixgbe: check EEPROM read in 82599 D3 path

Kevin Bowling <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a767bd6.40a81.27fa6750__11850.8497181878$1786149932$gmane$org@gitrepo.freebsd.org>
The branch stable/14 has been updated by kbowling:

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

commit fce4d00876e805ef7063141b22ce08b2e97bd42b
Author:     Barbara Skobiej <[email protected]>
AuthorDate: 2026-07-28 11:08:12 +0000
Commit:     Kevin Bowling <[email protected]>
CommitDate: 2026-08-08 00:41:34 +0000

    ixgbe: check EEPROM read in 82599 D3 path
    
    DPDK commit message
    
    net/ixgbe/base: fix unchecked return value
    
    Check the return value from ixgbe_read_eeprom() before using the
    control word to configure link disable during D3.
    
    Fixes:          b7ad3713b958 ("ixgbe/base: allow to disable link on D3")
    Cc: [email protected]
    
    Signed-off-by: Barbara Skobiej <[email protected]>
    Signed-off-by: Anatoly Burakov <[email protected]>
    Acked-by: Bruce Richardson <[email protected]>
    
    Obtained from:  DPDK (eb3684b191)
    
    (cherry picked from commit a8598143803d8db60568844cae86b0f330e49a1e)
---
 sys/dev/ixgbe/ixgbe_82599.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c
index 50902c6c356d..d23c84743b33 100644
--- a/sys/dev/ixgbe/ixgbe_82599.c
+++ b/sys/dev/ixgbe/ixgbe_82599.c
@@ -609,13 +609,15 @@ out:
  **/
 void ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw)
 {
-	u32 autoc2_reg;
 	u16 ee_ctrl_2 = 0;
+	u32 autoc2_reg;
+	s32 status;
 
 	DEBUGFUNC("ixgbe_stop_mac_link_on_d3_82599");
-	ixgbe_read_eeprom(hw, IXGBE_EEPROM_CTRL_2, &ee_ctrl_2);
+	status = ixgbe_read_eeprom(hw, IXGBE_EEPROM_CTRL_2, &ee_ctrl_2);
 
-	if (!ixgbe_mng_present(hw) && !hw->wol_enabled &&
+	if (status == IXGBE_SUCCESS &&
+	    !ixgbe_mng_present(hw) && !hw->wol_enabled &&
 	    ee_ctrl_2 & IXGBE_EEPROM_CCD_BIT) {
 		autoc2_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC2);
 		autoc2_reg |= IXGBE_AUTOC2_LINK_DISABLE_ON_D3_MASK;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.