aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarbara Skobiej <barbara.skobiej@intel.com>2026-07-28 11:08:12 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2026-08-08 00:41:34 +0000
commitfce4d00876e805ef7063141b22ce08b2e97bd42b (patch)
treef4134d0fc154d36f9b8a999bb20a9c917e3ff55a
parentd535381ea414ec12163339d8438ff03cbabdf7e9 (diff)
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: stable@dpdk.org Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Obtained from: DPDK (eb3684b191) (cherry picked from commit a8598143803d8db60568844cae86b0f330e49a1e)
-rw-r--r--sys/dev/ixgbe/ixgbe_82599.c8
1 files 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;