Patch "[PATCH 012/135] igb: use the correct i210 register for EEMNGCTL" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
[PATCH 012/135] igb: use the correct i210 register for EEMNGCTL
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
0012-igb-use-the-correct-i210-register-for-EEMNGCTL.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
379a0140a9487b32ae1f3cda40a90def2edcae9bMon Sep 17 00:00:00 2001
From: Todd Fujinaka <[email protected]>
Date: Fri, 18 Sep 2015 15:43:51 -0700
Subject: [PATCH 012/135] igb: use the correct i210 register for EEMNGCTL
[ Upstream commit 08c991297582114a6e1220f913eec91789c4eac6 ]
The i210 has two EEPROM access registers that are located in non-standard offsets: EEARBC and EEMNGCTL. EEARBC was fixed previously and EEMNGCTL should also be corrected.
--- drivers/net/ethernet/intel/igb/e1000_82575.c | 1 + drivers/net/ethernet/intel/igb/e1000_i210.c | 27 +++++++++++++++++++++++++++ drivers/net/ethernet/intel/igb/e1000_i210.h | 1 + drivers/net/ethernet/intel/igb/e1000_regs.h | 1 + 4 files changed, 30 insertions(+)
drivers/net/ethernet/intel/igb/e1000_82575.c +1 -0
@@ -294,6 +294,7 @@ static s32 igb_init_phy_params_82575(strcase I210_I_PHY_ID : phy->type = e1000_phy_i210; phy->ops.check_polarity = igb_check_polarity_m88; + phy->ops.get_cfg_done = igb_get_cfg_done_i210; phy->ops.get_phy_info = igb_get_phy_info_m88; phy->ops.get_cable_length = igb_get_cable_length_m88_gen2; phy->ops.set_d0_lplu_state = igb_set_d0_lplu_state_82580;
drivers/net/ethernet/intel/igb/e1000_i210.c +27 -0
@@ -900,3 +900,30 @@ s32 igb_pll_workaround_i210(struct e1000wr32 (E1000_MDICNFG , mdicnfg);return ret_val; } + +/** +* igb_get_cfg_done_i210 - Read config done bit +* @hw: pointer to the HW structure +* +* Read the management control register for the config done bit for +* completion status. NOTE: silicon which is EEPROM-less will fail trying +* to read the config done bit, so an error is *ONLY* logged and returns +* 0. If we were to return with error, EEPROM-less silicon +* would not be able to be reset or change link. +**/ +s32 igb_get_cfg_done_i210 (struct e1000_hw *hw) +{ +s32 timeout =PHY_CFG_TIMEOUT ; +u32 mask =E1000_NVM_CFG_DONE_PORT_0 ; + +while (timeout) { +if (rd32 (E1000_EEMNGCTL_I210 ) & mask) +break ; +usleep_range (1000 ,2000 ); + timeout--; + } +if (!timeout) +hw_dbg ("MNG configuration cycle has not completed.\n" ); + +return 0 ; +}
drivers/net/ethernet/intel/igb/e1000_i210.h +1 -0
@@ -34,6 +34,7 @@ s32 igb_write_xmdio_reg(struct e1000_hws32 igb_init_nvm_params_i210 (struct e1000_hw *hw);bool igb_get_flash_presence_i210 (struct e1000_hw *hw);s32 igb_pll_workaround_i210 (struct e1000_hw *hw); +s32 igb_get_cfg_done_i210 (struct e1000_hw *hw);#define E1000_STM_OPCODE 0xDB00#define E1000_EEPROM_FLASH_SIZE_WORD 0x11
drivers/net/ethernet/intel/igb/e1000_regs.h +1 -0
@@ -66,6 +66,7 @@#define E1000_PBA 0x01000/* Packet Buffer Allocation - RW */ #define E1000_PBS 0x01008/* Packet Buffer Size */ #define E1000_EEMNGCTL 0x01010/* MNG EEprom Control */ +#define E1000_EEMNGCTL_I210 0x12030/* MNG EEprom Control */ #define E1000_EEARBC_I210 0x12024/* EEPROM Auto Read Bus Control */ #define E1000_EEWR 0x0102C/* EEPROM Write Register - RW */ #define E1000_I2CCMD 0x01028/* SFPI2C Command Register - RW */
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/0012-igb-use-the-correct-i210-register-for-EEMNGCTL.patch