git: a8598143803d - main - ixgbe: check EEPROM read in 82599 D3 path
Kevin Bowling <[email protected]> Fri, 31 Jul 2026 11:09:14 +0000
| Newsgroups | gmane.os.freebsd.devel.cvs.src |
|---|---|
| Message-ID | <6a6c825a.3bb94.7b2d97c4__5000.42448272637$1785496177$gmane$org@gitrepo.freebsd.org> |
The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a8598143803d8db60568844cae86b0f330e49a1e commit a8598143803d8db60568844cae86b0f330e49a1e Author: Barbara Skobiej <[email protected]> AuthorDate: 2026-07-28 11:08:12 +0000 Commit: Kevin Bowling <[email protected]> CommitDate: 2026-07-31 11:07:01 +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) MFC after: 1 week --- 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;