e1000 base code update
cover e1000 base code update
Update the e1000 base code. The changes are mostly fixes, refactoring, and code cleanup.
Ciara Loftus (1):
net/e1000/base: update version info
Dima Ruinskiy (2):
net/e1000/base: fix coding style issues net/e1000/base: propagate PHY control register write error
Lukasz Czapnik (1):
net/e1000/base: fix possible variable overflow
Mateusz Fryze (1):
net/e1000/base: auto-negotiation status for 1000BASE-T
Menachem Fogel (1):
net/e1000/base: fix NVM loop bounds and pointer access
Vitaly Lifshits (4):
net/e1000/base: refactor K1 exit timeout configuration net/e1000/base: fix typo in e1000 base code net/e1000/base: reclassify MAC type net/e1000/base: clear DPG enable bit post MAC reset
.mailmap | 1 + drivers/net/intel/e1000/base/README | 4 +- drivers/net/intel/e1000/base/e1000_82575.c | 5 +- drivers/net/intel/e1000/base/e1000_api.c | 20 ++++- drivers/net/intel/e1000/base/e1000_api.h | 1 + drivers/net/intel/e1000/base/e1000_defines.h | 23 ++++++ drivers/net/intel/e1000/base/e1000_hw.h | 9 ++ drivers/net/intel/e1000/base/e1000_ich8lan.c | 28 +++++-- drivers/net/intel/e1000/base/e1000_ich8lan.h | 3 + drivers/net/intel/e1000/base/e1000_mac.c | 2 +- drivers/net/intel/e1000/base/e1000_manage.c | 4 +- drivers/net/intel/e1000/base/e1000_phy.c | 86 +++++++++++++++++++- drivers/net/intel/e1000/base/e1000_phy.h | 2 + 13 files changed, 169 insertions(+), 19 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/10 net/e1000/base: refactor K1 exit timeout configuration
From: Vitaly Lifshits <[email protected]>
Replace magic numbers in the FEXTNVM12 register access with named bit definitions to improve readability. Add a missing error path to ensure ME activity blocking a PHY reset is correctly propagated to the caller. Also improve some code formatting.
--- drivers/net/intel/e1000/base/e1000_ich8lan.c | 11 ++++++++--- drivers/net/intel/e1000/base/e1000_ich8lan.h | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-)
drivers/net/intel/e1000/base/e1000_ich8lan.c +8 -3
@@ -305,8 +305,8 @@ STATIC s32 e1000_reconfigure_k1_exit_timeout(struct e1000_hw *hw)return E1000_SUCCESS ; fextnvm12 =E1000_READ_REG (hw,E1000_FEXTNVM12 ); - fextnvm12 |= (1 <<23 ); - fextnvm12 &= ~((1 <<22 )); + fextnvm12 &= ~E1000_FEXTNVM12_PHYPD_CTRL_MASK ; + fextnvm12 |=E1000_FEXTNVM12_PHYPD_CTRL_P1 ;E1000_WRITE_REG (hw,E1000_FEXTNVM12 , fextnvm12);msec_delay_irq (1 );
@@ -318,6 +318,9 @@ STATIC s32 e1000_reconfigure_k1_exit_timeout(struct e1000_hw *hw) ret_val = hw->phy.ops.write_reg_locked (hw,E1000_PHY_TIMEOUTS_REG , phy_timeout); +DEBUGOUT1 ("e1000_reconfigure_k1_exit_timeout returns %d\n" , + ret_val); +return ret_val; }
@@ -460,8 +463,10 @@ STATIC s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)* the PHY is in. */ ret_val = hw->phy.ops.check_reset_block (hw); -if (ret_val) +if (ret_val) {ERROR_REPORT ("ME blocked access to PHY after reset\n" ); + goto out; + }if (hw->mac.type >= e1000_pch_mtp) { ret_val = hw->phy.ops.acquire (hw);
drivers/net/intel/e1000/base/e1000_ich8lan.h +3 -0
@@ -89,6 +89,9 @@#define E1000_FEXTNVM11_DISABLE_PB_READ 0x00000200#define E1000_FEXTNVM11_DISABLE_MULR_FIX 0x00002000#define E1000_FEXTNVM12_DONT_WAK_DPG_CLKREQ 0x00001000 +#define E1000_FEXTNVM12_PHYPD_CTRL_MASK 0x00C00000 +#define E1000_FEXTNVM12_PHYPD_CTRL_P1 0x00800000 +/* bit24: RXDCTL thresholds granularity: 0 - cache lines, 1 - descriptors */ #define E1000_RXDCTL_THRESH_UNIT_DESC 0x01000000
Signature · 1 line
2.43.0
PATCH 2/10 net/e1000/base: fix typo in e1000 base code
In reply to Ciara LoftusFrom: Vitaly Lifshits <[email protected]>
A typo was introduced in commit ba54bdc79d94 ("net/e1000/base: improve clock synchronization workaround"). Fix it.
--- drivers/net/intel/e1000/base/e1000_ich8lan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/intel/e1000/base/e1000_ich8lan.c +1 -1
@@ -288,7 +288,7 @@ STATIC void e1000_toggle_lanphypc_pch_lpt(struct e1000_hw *hw)* e1000_reconfigure_k1_exit_timeout * @hw: pointer to the HW structure * -* Reconfigure K1 exit timeout as a workaround to the PHY sycndhronization issue +* Reconfigure K1 exit timeout as a workaround to the PHY synchronization issue * on MTL, LNL, PTL and WCL. * * Assuming PHY semaphore is taken prior to this function call.
Signature · 1 line
2.43.0
PATCH 3/10 net/e1000/base: fix possible variable overflow
In reply to Ciara LoftusFrom: Lukasz Czapnik <[email protected]>
Bits can be lost as temporary math is done on signed variables and the result is assigned to an unsigned variable. Cast to u32 to force the compiler to do operations on unsigned temporary variables.
--- drivers/net/intel/e1000/base/e1000_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/intel/e1000/base/e1000_mac.c +1 -1
@@ -1970,7 +1970,7 @@ s32 e1000_blink_led_generic(struct e1000_hw *hw) (mode == E1000_LEDCTL_MODE_LED_OFF))) { ledctl_blink &= ~(E1000_LEDCTL_LED0_MODE_MASK << i); - ledctl_blink |= (E1000_LEDCTL_LED0_BLINK | + ledctl_blink |= (u32)(E1000_LEDCTL_LED0_BLINK |E1000_LEDCTL_MODE_LED_ON ) << i; } }
Signature · 1 line
2.43.0
PATCH 4/10 net/e1000/base: reclassify MAC type
In reply to Ciara LoftusFrom: Vitaly Lifshits <[email protected]>
Reclassify LM19/V19 from e1000_pch_mtp to e1000_pch_adp.
--- drivers/net/intel/e1000/base/e1000_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/e1000/base/e1000_api.c +2 -2
@@ -312,12 +312,12 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)case E1000_DEV_ID_PCH_ADL_I219_V17 :case E1000_DEV_ID_PCH_RPL_I219_LM22 :case E1000_DEV_ID_PCH_RPL_I219_V22 : +case E1000_DEV_ID_PCH_MTP_I219_LM19 : +case E1000_DEV_ID_PCH_MTP_I219_V19 : mac->type = e1000_pch_adp;break ;case E1000_DEV_ID_PCH_MTP_I219_LM18 :case E1000_DEV_ID_PCH_MTP_I219_V18 : -case E1000_DEV_ID_PCH_MTP_I219_LM19 : -case E1000_DEV_ID_PCH_MTP_I219_V19 :case E1000_DEV_ID_PCH_LNL_I219_LM20 :case E1000_DEV_ID_PCH_LNL_I219_V20 :case E1000_DEV_ID_PCH_ARL_I219_LM24 :
Signature · 1 line
2.43.0
PATCH 5/10 net/e1000/base: clear DPG enable bit post MAC reset
In reply to Ciara LoftusFrom: Vitaly Lifshits <[email protected]>
The GbE autonomous power gating feature was added to support G3 to S5 flow. However, this changed the reset value of DPG_EN bit to 1, causing a possible autonomous transition to power gating state during D0. This might result in undefined errors such as: packet loss, packet corruption and Tx/Rx hangs. Therefore, clear DPG_EN bit after hardware reset flow.
--- drivers/net/intel/e1000/base/e1000_defines.h | 1 + drivers/net/intel/e1000/base/e1000_ich8lan.c | 7 +++++++ 2 files changed, 8 insertions(+)
drivers/net/intel/e1000/base/e1000_defines.h +1 -0
@@ -36,6 +36,7 @@/* Extended Device Control */ #define E1000_CTRL_EXT_LPCD 0x00000004/* LCD Power Cycle Done */ +#define E1000_CTRL_EXT_DPG_EN 0x00000008/* Dynamic Power Gating Enable */ #define E1000_CTRL_EXT_SDP4_DATA 0x00000010/* SW Definable Pin 4 data */ #define E1000_CTRL_EXT_SDP6_DATA 0x00000040/* SW Definable Pin 6 data */ #define E1000_CTRL_EXT_SDP3_DATA 0x00000080/* SW Definable Pin 3 data */
drivers/net/intel/e1000/base/e1000_ich8lan.c +7 -0
@@ -5107,6 +5107,13 @@ STATIC s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) reg |=E1000_KABGTXD_BGSQLBIAS ;E1000_WRITE_REG (hw,E1000_KABGTXD , reg); +if (hw->mac.type >= e1000_pch_ptp) { +DEBUGOUT ("Clearing DPG EN bit post reset\n" ); + reg =E1000_READ_REG (hw,E1000_CTRL_EXT ); + reg &= ~E1000_CTRL_EXT_DPG_EN ; +E1000_WRITE_REG (hw,E1000_CTRL_EXT , reg); + } +return E1000_SUCCESS ; }
Signature · 1 line
2.43.0
Re: [PATCH 05/10] net/e1000/base: clear DPG enable bit post MAC reset
Quoted 11 lines · Ciara Loftus
From: Vitaly Lifshits <[email protected]>
The GbE autonomous power gating feature was added to support G3 to S5 flow. However, this changed the reset value of
DPG_ENbit to 1, causing a possible autonomous transition to power gating state during D0. This might result in undefined errors such as: packet loss, packet corruption and Tx/Rx hangs. Therefore, clearDPG_ENbit after hardware reset flow.Signed-off-by Vitaly Lifshits <[email protected]>Signed-off-by Ciara Loftus <[email protected]>---
Seems like a bug fix needing backport. Will add fixes tag and CC stable on apply.
Quoted 37 lines
drivers/net/intel/e1000/base/e1000_defines.h | 1 + drivers/net/intel/e1000/base/e1000_ich8lan.c | 7 +++++++ 2 files changed, 8 insertions(+)drivers/net/intel/e1000/base/e1000_defines.h +1
-0@@ -36,6 +36,7 @@/* Extended Device Control */ #define E1000_CTRL_EXT_LPCD 0x00000004/* LCD Power Cycle Done */ +#define E1000_CTRL_EXT_DPG_EN 0x00000008/* Dynamic Power Gating Enable */ #define E1000_CTRL_EXT_SDP4_DATA 0x00000010/* SW Definable Pin 4 data */ #define E1000_CTRL_EXT_SDP6_DATA 0x00000040/* SW Definable Pin 6 data */ #define E1000_CTRL_EXT_SDP3_DATA 0x00000080/* SW Definable Pin 3 data */ drivers/net/intel/e1000/base/e1000_ich8lan.c +7
-0@@ -5107,6 +5107,13 @@ STATIC s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) reg |=E1000_KABGTXD_BGSQLBIAS ;E1000_WRITE_REG (hw,E1000_KABGTXD , reg); +if (hw->mac.type >= e1000_pch_ptp) { +DEBUGOUT ("Clearing DPG EN bit post reset\n" ); + reg =E1000_READ_REG (hw,E1000_CTRL_EXT ); + reg &= ~E1000_CTRL_EXT_DPG_EN ; +E1000_WRITE_REG (hw,E1000_CTRL_EXT , reg); + } +return E1000_SUCCESS ; }Signature · 1 line
2.43.0
PATCH 6/10 net/e1000/base: fix coding style issues
In reply to Ciara LoftusFrom: Dima Ruinskiy <[email protected]>
Fix whitespace and tab inconsistencies.
--- drivers/net/intel/e1000/base/e1000_ich8lan.c | 6 +++--- drivers/net/intel/e1000/base/e1000_phy.c | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-)
drivers/net/intel/e1000/base/e1000_ich8lan.c +3 -3
@@ -4178,7 +4178,7 @@ STATIC s32 e1000_update_nvm_checksum_spt(struct e1000_hw *hw)usec_delay (100 ); -/* Write the data to the new bank. Offset in words*/ +/* Write the data to the new bank. Offset in words */ act_offset = i + new_bank_offset; ret_val =e1000_retry_write_flash_dword_ich8lan (hw, act_offset, dword);
@@ -4201,7 +4201,7 @@ STATIC s32 e1000_update_nvm_checksum_spt(struct e1000_hw *hw)*/ act_offset = new_bank_offset +E1000_ICH_NVM_SIG_WORD ; -/*offset in words but we read dword*/ +/* offset in words but we read dword */ --act_offset; ret_val =e1000_read_flash_dword_ich8lan (hw, act_offset, &dword);
@@ -4214,7 +4214,7 @@ STATIC s32 e1000_update_nvm_checksum_spt(struct e1000_hw *hw)if (ret_val) goto release; -/* offset in words but we read dword*/ +/* offset in words but we read dword */ act_offset = old_bank_offset +E1000_ICH_NVM_SIG_WORD -1 ; ret_val =e1000_read_flash_dword_ich8lan (hw, act_offset, &dword);
drivers/net/intel/e1000/base/e1000_phy.c +2 -3
@@ -253,7 +253,7 @@ s32 e1000_phy_reset_dsp_generic(struct e1000_hw *hw)return hw->phy.ops.write_reg (hw,M88E1000_PHY_GEN_CONTROL ,0 ); } -void e1000_disable_phy_retry_mechanism (struct e1000_hw * hw,u32 * phy_retries_original) +void e1000_disable_phy_retry_mechanism (struct e1000_hw *hw,u32 *phy_retries_original) {DEBUGFUNC ("e1000_disable_phy_retry_mechanism" );
@@ -262,7 +262,7 @@ void e1000_disable_phy_retry_mechanism(struct e1000_hw* hw, u32* phy_retries_ori hw->phy.current_retry_counter =0 ; } -void e1000_enable_phy_retry_mechanism (struct e1000_hw * hw,u32 phy_retries_original) +void e1000_enable_phy_retry_mechanism (struct e1000_hw *hw,u32 phy_retries_original) {DEBUGFUNC ("e1000_enable_phy_retry_mechanism" );
@@ -346,7 +346,6 @@ s32 e1000_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data) } } -return -E1000_ERR_PHY ; }
Signature · 1 line
2.43.0
PATCH 7/10 net/e1000/base: fix NVM loop bounds and pointer access
In reply to Ciara LoftusFrom: Menachem Fogel <[email protected]>
Improve the NVM checksum routines by ensuring loop bounds are compared at the correct integer width. Use array indexing instead of explicit pointer arithmetic.
--- drivers/net/intel/e1000/base/e1000_82575.c | 4 ++-- drivers/net/intel/e1000/base/e1000_manage.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/intel/e1000/base/e1000_82575.c +2 -2
@@ -2395,7 +2395,7 @@ s32 e1000_validate_nvm_checksum_with_offset(struct e1000_hw *hw, u16 offset)DEBUGFUNC ("e1000_validate_nvm_checksum_with_offset" ); -for (i = offset; i < ((NVM_CHECKSUM_REG + offset) +1 ); i++) { +for (i = offset; i < (u16)((NVM_CHECKSUM_REG + offset) +1 ); i++) { ret_val = hw->nvm.ops.read (hw, i,1 , &nvm_data);if (ret_val) {DEBUGOUT ("NVM Read Error\n" );
@@ -2432,7 +2432,7 @@ s32 e1000_update_nvm_checksum_with_offset(struct e1000_hw *hw, u16 offset)DEBUGFUNC ("e1000_update_nvm_checksum_with_offset" ); -for (i = offset; i < (NVM_CHECKSUM_REG + offset); i++) { +for (i = offset; i < (u16)(NVM_CHECKSUM_REG + offset); i++) { ret_val = hw->nvm.ops.read (hw, i,1 , &nvm_data);if (ret_val) {DEBUGOUT ("NVM Read Error while updating checksum.\n" );
drivers/net/intel/e1000/base/e1000_manage.c +2 -2
@@ -129,7 +129,7 @@ bool e1000_enable_tx_pkt_filtering_generic(struct e1000_hw *hw) len =E1000_MNG_DHCP_COOKIE_LENGTH >>2 ; offset =E1000_MNG_DHCP_COOKIE_OFFSET >>2 ;for (i =0 ; i < len; i++) - *(buffer + i) =E1000_READ_REG_ARRAY_DWORD (hw,E1000_HOST_IF , + buffer[i] =E1000_READ_REG_ARRAY_DWORD (hw,E1000_HOST_IF , offset + i); hdr_csum = hdr->checksum; hdr->checksum =0 ;
@@ -173,7 +173,7 @@ s32 e1000_mng_write_cmd_header_generic(struct e1000_hw *hw,/* Write the relevant command block into the ram area. */ for (i =0 ; i < length; i++) {E1000_WRITE_REG_ARRAY_DWORD (hw,E1000_HOST_IF , i, - *((u32 *) hdr + i)); + ((u32 *)hdr)[i]);E1000_WRITE_FLUSH (hw); }
Signature · 1 line
2.43.0
PATCH 8/10 net/e1000/base: propagate PHY control register write error
In reply to Ciara LoftusFrom: Dima Ruinskiy <[email protected]>
During HV PHY workaround handling, a failure writing to the PHY control register was silently discarded rather than returned to the caller. Add the missing early return so the error is correctly propagated.
--- drivers/net/intel/e1000/base/e1000_ich8lan.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/intel/e1000/base/e1000_ich8lan.c +2 -0
@@ -2696,6 +2696,8 @@ STATIC s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw)e1000_phy_sw_reset_generic (hw); ret_val = hw->phy.ops.write_reg (hw,PHY_CONTROL ,0x3140 ); +if (ret_val) +return ret_val; } }
Signature · 1 line
2.43.0
PATCH 9/10 net/e1000/base: auto-negotiation status for 1000BASE-T
In reply to Ciara LoftusFrom: Mateusz Fryze <[email protected]>
Add functionality to find auto-negotiation status on 1000BASE-T PHYs based on specific PHY registers.
--- .mailmap | 1 + drivers/net/intel/e1000/base/e1000_82575.c | 1 + drivers/net/intel/e1000/base/e1000_api.c | 16 ++++ drivers/net/intel/e1000/base/e1000_api.h | 1 + drivers/net/intel/e1000/base/e1000_defines.h | 22 ++++++ drivers/net/intel/e1000/base/e1000_hw.h | 9 +++ drivers/net/intel/e1000/base/e1000_phy.c | 81 ++++++++++++++++++++ drivers/net/intel/e1000/base/e1000_phy.h | 2 + 8 files changed, 133 insertions(+)
.mailmap +1 -0
@@ -1033,6 +1033,7 @@ Masoud Hasanifard <[email protected]> Masoumeh Farhadi Nia <[email protected]> Matan Azrad <[email protected]> <[email protected]> Matej Vido <[email protected]> <[email protected]> +Mateusz Fryze <[email protected]> Mateusz Kowalski <[email protected]> Mateusz Pacuszka <[email protected]> Mateusz Polchlopek <[email protected]>
drivers/net/intel/e1000/base/e1000_82575.c +1 -0
@@ -233,6 +233,7 @@ STATIC s32 e1000_init_phy_params_82575(struct e1000_hw *hw) phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82580; phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_82577; + phy->ops.get_an_status = e1000_1gbase_t_autoneg_status;break ;case I210_I_PHY_ID : phy->type = e1000_phy_i210;
drivers/net/intel/e1000/base/e1000_api.c +16 -0
@@ -1138,6 +1138,22 @@ s32 e1000_get_phy_info(struct e1000_hw *hw)return E1000_SUCCESS ; } +/** +* e1000_get_an_status - Finds Auto-negotiation status based on PHY registers +* @hw: pointer to the HW structure +* @an_status: AN status +* +* This function gets information from the PHY specific registers to determine +* Auto-negotiation status. +**/ +s32 e1000_get_an_status (struct e1000_hw *hw,u8 *an_status) +{ +if (hw->phy.ops.get_an_status) +return hw->phy.ops.get_an_status (hw, an_status); + +return E1000_SUCCESS ; +} +/** * e1000_phy_hw_reset - Hard PHY reset * @hw: pointer to the HW structure
drivers/net/intel/e1000/base/e1000_api.h +1 -0
@@ -59,6 +59,7 @@ s32 e1000_write_phy_reg(struct e1000_hw *hw, u32 offset, u16 data);s32 e1000_write_8bit_ctrl_reg (struct e1000_hw *hw,u32 reg,u32 offset,u8 data);s32 e1000_get_phy_info (struct e1000_hw *hw); +s32 e1000_get_an_status (struct e1000_hw *hw,u8 *an_status);void e1000_release_phy (struct e1000_hw *hw);s32 e1000_acquire_phy (struct e1000_hw *hw);s32 e1000_cfg_on_link_up (struct e1000_hw *hw);
drivers/net/intel/e1000/base/e1000_defines.h +22 -0
@@ -1103,6 +1103,28 @@#define PHY_1000T_STATUS 0x0A/* 1000Base-T Status Reg */ #define PHY_EXT_STATUS 0x0F/* Extended Status Reg */ +/* PHY Status Register */ +#define PHY_STATUS_LINK_STATUS_SHIFT 2 +#define PHY_STATUS_AN_ABILITY_SHIFT 3 +#define PHY_STATUS_REMOTE_FAULT_SHIFT 4 +#define PHY_STATUS_AN_COMPLETE_SHIFT 5 +#define PHY_STATUS_LINK_STATUS_MASK (0x01 << PHY_STATUS_LINK_STATUS_SHIFT) +#define PHY_STATUS_AN_ABILITY_MASK (0x01 << PHY_STATUS_AN_ABILITY_SHIFT) +#define PHY_STATUS_REMOTE_FAULT_MASK (0x01 << PHY_STATUS_REMOTE_FAULT_SHIFT) +#define PHY_STATUS_AN_COMPLETE_MASK (0x01 << PHY_STATUS_AN_COMPLETE_SHIFT) + +/* Auto negotiation Expansion Register */ +#define PHY_AUTONEG_EXP_LP_AN_ABLE_SHIFT 0 +#define PHY_AUTONEG_EXP_PAGE_RECVD_SHIFT 1 +#define PHY_AUTONEG_EXP_NEXT_PAGE_ABLE_SHIFT 2 +#define PHY_AUTONEG_EXP_LP_NEXT_PAGE_ABLE_SHIFT 3 +#define PHY_AUTONEG_EXP_PARALLEL_DETECT_FLT_SHIFT 4 +#define PHY_AUTONEG_EXP_LP_AN_ABLE_MASK (0x01 << PHY_AUTONEG_EXP_LP_AN_ABLE_SHIFT) +#define PHY_AUTONEG_EXP_PAGE_RECVD_MASK (0x01 << PHY_AUTONEG_EXP_PAGE_RECVD_SHIFT) +#define PHY_AUTONEG_EXP_NEXT_PAGE_ABLE_MASK (0x01 << PHY_AUTONEG_EXP_NEXT_PAGE_ABLE_SHIFT) +#define PHY_AUTONEG_EXP_LP_NEXT_PAGE_ABLE_MASK (0x01 << PHY_AUTONEG_EXP_LP_NEXT_PAGE_ABLE_SHIFT) +#define PHY_AUTONEG_EXP_PARALLEL_DETECT_FLT_MASK (0x01 << PHY_AUTONEG_EXP_PARALLEL_DETECT_FLT_SHIFT) +/* PHY GPY 211 registers */ #define STANDARD_AN_REG_MASK 0x0007/* MMD */ #define ANEG_MULTIGBT_AN_CTRL 0x0020/* MULTI GBT AN Control Register */
drivers/net/intel/e1000/base/e1000_hw.h +9 -0
@@ -409,6 +409,14 @@ enum e1000_serdes_link_state {e1000_serdes_link_forced_up }; +enum e1000_autoneg_status { + e1000_an_off =0 ,/* No conn.; AN unsupported, disabled, or disabled on the LP */ + e1000_an_failed,/* Remote Fault or Parallel Detection Fault reported */ + e1000_an_in_progress, + e1000_an_complete, + e1000_an_status_unavailable/* AN status could not be obtained */ +}; +enum e1000_invm_structure_type { e1000_invm_uninitialized_structure =0x00 , e1000_invm_word_autoload_structure =0x01 ,
@@ -803,6 +811,7 @@ struct e1000_phy_operations {s32 (*write_reg_page)(struct e1000_hw *,u32 ,u16 );void (*power_up)(struct e1000_hw *);void (*power_down)(struct e1000_hw *); +s32 (*get_an_status)(struct e1000_hw *,u8 *);s32 (*read_i2c_byte)(struct e1000_hw *,u8 ,u8 ,u8 *);s32 (*write_i2c_byte)(struct e1000_hw *,u8 ,u8 ,u8 ); };
drivers/net/intel/e1000/base/e1000_phy.c +81 -0
99 lines not on this page · raw message
drivers/net/intel/e1000/base/e1000_phy.h +2 -0
@@ -11,6 +11,7 @@ void e1000_null_phy_generic(struct e1000_hw *hw);s32 e1000_null_lplu_state (struct e1000_hw *hw,bool active);s32 e1000_null_write_reg (struct e1000_hw *hw,u32 offset,u16 data);s32 e1000_null_set_page (struct e1000_hw *hw,u16 data); +s32 e1000_null_an_status (struct e1000_hw *hw,u8 *status);s32 e1000_read_i2c_byte_null (struct e1000_hw *hw,u8 byte_offset,u8 dev_addr,u8 *data); s32 e1000_write_i2c_byte_null(struct e1000_hw *hw, u8 byte_offset,
@@ -22,6 +23,7 @@ s32 e1000_check_polarity_ife(struct e1000_hw *hw);s32 e1000_check_reset_block_generic (struct e1000_hw *hw);s32 e1000_phy_setup_autoneg (struct e1000_hw *hw);s32 e1000_copper_link_autoneg (struct e1000_hw *hw); +s32 e1000_1gbase_t_autoneg_status (struct e1000_hw *hw,u8 *an_status);s32 e1000_copper_link_setup_igp (struct e1000_hw *hw);s32 e1000_copper_link_setup_m88 (struct e1000_hw *hw);s32 e1000_copper_link_setup_m88_gen2 (struct e1000_hw *hw);
Signature · 1 line
2.43.0
PATCH 10/10 net/e1000/base: update version info
In reply to Ciara LoftusUpdate the last shared code update date.
--- drivers/net/intel/e1000/base/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/e1000/base/README +2 -2
@@ -1,9 +1,9 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2010-2025 Intel Corporation + * Copyright(c) 2010-2026 Intel Corporation */ This directory contains source code of the base driver code for em/igb/igc, -with this snapshot generated on 2025-06-04-14.40. +with this snapshot generated on 2026-05-07-13.50. This driver is valid for the product(s) listed below * Intel® Ethernet Controller 82540
Signature · 1 line
2.43.0
Bruce Richardson
AppliedQuoted 16 lines · Ciara Loftus
Update the e1000 base code. The changes are mostly fixes, refactoring, and code cleanup.
Ciara Loftus (1):
net/e1000/base: update version infoDima Ruinskiy (2):
net/e1000/base: fix coding style issuesnet/e1000/base: propagate PHY control register write errorLukasz Czapnik (1):
net/e1000/base: fix possible variable overflowMateusz Fryze (1):
net/e1000/base: auto-negotiation status for 1000BASE-T
Quoted 9 lines
Menachem Fogel (1):
net/e1000/base: fix NVM loop bounds and pointer accessVitaly Lifshits (4):
net/e1000/base: refactor K1 exit timeout configurationnet/e1000/base: fix typo in e1000 base codenet/e1000/base: reclassify MAC typenet/e1000/base: clear DPG enable bit post MAC reset
Applied to next-net-intel.
Thanks,
/Bruce