igb: Remove GS40G specific defines/functions
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/5 igb: Remove GS40G specific defines/functions
The I210 internal PHY can be accessed just as well with the access functions shared by 82580, I350, and I354 devices. A side effect of relying on the common functions, is that I210 cable length support is folded back into the common case which effectively reverts the following commit:
commit 59f301046b276f87483b3afa3201a4273def06a9
Author: Carolyn Wyborny <[email protected]>
Date: Wed Oct 10 04:42:59 2012 +0000
igb: Update get cable length function for i210/i211
--- drivers/net/ethernet/intel/igb/e1000_82575.c | 13 ++--- drivers/net/ethernet/intel/igb/e1000_i210.c | 5 +- drivers/net/ethernet/intel/igb/e1000_i210.h | 2 +- drivers/net/ethernet/intel/igb/e1000_phy.c | 82 +--------------------------- drivers/net/ethernet/intel/igb/e1000_phy.h | 15 +---- 5 files changed, 11 insertions(+), 106 deletions(-)
drivers/net/ethernet/intel/igb/e1000_82575.c +4 -9
@@ -45,8 +45,6 @@ static s32 igb_get_cfg_done_82575(struct e1000_hw *);static s32 igb_init_hw_82575 (struct e1000_hw *);static s32 igb_phy_hw_reset_sgmii_82575 (struct e1000_hw *);static s32 igb_read_phy_reg_sgmii_82575 (struct e1000_hw *,u32 ,u16 *); -static s32 igb_read_phy_reg_82580 (struct e1000_hw *,u32 ,u16 *); -static s32 igb_write_phy_reg_82580 (struct e1000_hw *,u32 ,u16 );static s32 igb_reset_hw_82575 (struct e1000_hw *);static s32 igb_reset_hw_82580 (struct e1000_hw *);static s32 igb_set_d0_lplu_state_82575 (struct e1000_hw *,bool );
@@ -205,13 +203,10 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)case e1000_82580:case e1000_i350:case e1000_i354: - phy->ops.read_reg = igb_read_phy_reg_82580; - phy->ops.write_reg = igb_write_phy_reg_82580; -break ;case e1000_i210:case e1000_i211: - phy->ops.read_reg = igb_read_phy_reg_gs40g; - phy->ops.write_reg = igb_write_phy_reg_gs40g; + phy->ops.read_reg = igb_read_phy_reg_82580; + phy->ops.write_reg = igb_write_phy_reg_82580;break ;default : phy->ops.read_reg = igb_read_phy_reg_igp;
@@ -2145,7 +2140,7 @@ void igb_vmdq_set_replication_pf(struct e1000_hw *hw, bool enable)* Reads the MDI control register in the PHY at offset and stores the * information read to data. **/ -static s32 igb_read_phy_reg_82580 (struct e1000_hw *hw,u32 offset,u16 *data) +s32 igb_read_phy_reg_82580 (struct e1000_hw *hw,u32 offset,u16 *data) {s32 ret_val;
@@ -2169,7 +2164,7 @@ out:* * Writes data to MDI control register in the PHY at offset. **/ -static s32 igb_write_phy_reg_82580 (struct e1000_hw *hw,u32 offset,u16 data) +s32 igb_write_phy_reg_82580 (struct e1000_hw *hw,u32 offset,u16 data) {s32 ret_val;
drivers/net/ethernet/intel/igb/e1000_i210.c +3 -2
@@ -861,10 +861,10 @@ s32 igb_pll_workaround_i210(struct e1000_hw *hw)if (ret_val) nvm_word =E1000_INVM_DEFAULT_AL ; tmp_nvm = nvm_word |E1000_INVM_PLL_WO_VAL ; +igb_write_phy_reg_82580 (hw,I347AT4_PAGE_SELECT ,E1000_PHY_PLL_FREQ_PAGE );for (i =0 ; i <E1000_MAX_PLL_TRIES ; i++) {/* check current state directly from internal PHY */ -igb_read_phy_reg_gs40g (hw, (E1000_PHY_PLL_FREQ_PAGE | -E1000_PHY_PLL_FREQ_REG ), &phy_word); +igb_read_phy_reg_82580 (hw,E1000_PHY_PLL_FREQ_REG , &phy_word);if ((phy_word &E1000_PHY_PLL_UNCONF ) !=E1000_PHY_PLL_UNCONF ) { ret_val =0 ;
@@ -896,6 +896,7 @@ s32 igb_pll_workaround_i210(struct e1000_hw *hw)/* restore WUC register */ wr32 (E1000_WUC , wuc); } +igb_write_phy_reg_82580 (hw,I347AT4_PAGE_SELECT ,0 );/* restore MDICNFG setting */ wr32 (E1000_MDICNFG , mdicnfg);return ret_val;
drivers/net/ethernet/intel/igb/e1000_i210.h +1 -1
@@ -84,7 +84,7 @@ enum E1000_INVM_STRUCTURE_TYPE {#define E1000_PCI_PMCSR_D3 0x03#define E1000_MAX_PLL_TRIES 5#define E1000_PHY_PLL_UNCONF 0xFF -#define E1000_PHY_PLL_FREQ_PAGE 0xFC0000 +#define E1000_PHY_PLL_FREQ_PAGE 0xFC#define E1000_PHY_PLL_FREQ_REG 0x000E#define E1000_INVM_DEFAULT_AL 0x202F#define E1000_INVM_AUTOLOAD 0x0A
drivers/net/ethernet/intel/igb/e1000_phy.c +1 -81
97 lines not on this page · raw message
drivers/net/ethernet/intel/igb/e1000_phy.h +2 -13
@@ -71,8 +71,8 @@ s32 igb_copper_link_setup_82580(struct e1000_hw *hw);s32 igb_get_phy_info_82580 (struct e1000_hw *hw);s32 igb_phy_force_speed_duplex_82580 (struct e1000_hw *hw);s32 igb_get_cable_length_82580 (struct e1000_hw *hw); -s32 igb_read_phy_reg_gs40g (struct e1000_hw *hw,u32 offset,u16 *data); -s32 igb_write_phy_reg_gs40g (struct e1000_hw *hw,u32 offset,u16 data); +s32 igb_read_phy_reg_82580 (struct e1000_hw *hw,u32 offset,u16 *data); +s32 igb_write_phy_reg_82580 (struct e1000_hw *hw,u32 offset,u16 data);s32 igb_check_polarity_m88 (struct e1000_hw *hw);/* IGP01E1000 Specific Registers */
@@ -143,17 +143,6 @@ s32 igb_check_polarity_m88(struct e1000_hw *hw);#define E1000_CABLE_LENGTH_UNDEFINED 0xFF -/* GS40G - I210 PHY defines */ -#define GS40G_PAGE_SELECT 0x16 -#define GS40G_PAGE_SHIFT 16 -#define GS40G_OFFSET_MASK 0xFFFF -#define GS40G_PAGE_2 0x20000 -#define GS40G_MAC_REG2 0x15 -#define GS40G_MAC_LB 0x4140 -#define GS40G_MAC_SPEED_1G 0X0006 -#define GS40G_COPPER_SPEC 0x0010 -#define GS40G_LINE_LB 0x4000 -/* SFP modules ID memory locations */ #define E1000_SFF_IDENTIFIER_OFFSET 0x00#define E1000_SFF_IDENTIFIER_SFF 0x02
Signature · 1 line
1.9.1
PATCH 1/5 igb: Remove GS40G specific defines/functions
Quoted 14 lines · Aaron Sierra
The I210 internal PHY can be accessed just as well with the access functions shared by 82580, I350, and I354 devices. A side effect of relying on the common functions, is that I210 cable length support is folded back into the common case which effectively reverts the following commit:
??? commit
59f301046b276f87483b3afa3201a4273def06a9??? Author: Carolyn Wyborny <[email protected]> ??? Date:?? Wed Oct 10 04:42:59 2012 +0000??? igb: Update get cable length function for i210/i211
Cc Carolyn Wyborny <[email protected]>Signed-off-by Aaron Sierra <[email protected]>
Quoted 8 lines
---
?drivers/net/ethernet/intel/igb/e1000_82575.c | 13 ++--- ?drivers/net/ethernet/intel/igb/e1000_i210.c? |? 5 +- ?drivers/net/ethernet/intel/igb/e1000_i210.h? |? 2 +- ?drivers/net/ethernet/intel/igb/e1000_phy.c?? | 82 +---------------------------
?drivers/net/ethernet/intel/igb/e1000_phy.h?? | 15 +---- ?5 files changed, 11 insertions(+), 106 deletions(-)
Other than patch 4 of your series, the rest of the series touch code
which we "share" with our various other drivers. ?We would need you to
assign copyright back to Intel for patches 1, 2, 3 & 5 so that would
retain copyright on the changes so that we can re-license the changes
for our other drivers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20151106/c069f0bd/attachment.asc>
PATCH 1/5 igb: Remove GS40G specific defines/functions
----- Original Message -----
Quoted 27 lines
From: "Jeff Kirsher" <[email protected]>
Sent: Friday, November 6, 2015 2:04:57 AMQuoted 14 lines · Aaron Sierra
The I210 internal PHY can be accessed just as well with the access functions shared by 82580, I350, and I354 devices. A side effect of relying on the common functions, is that I210 cable length support is folded back into the common case which effectively reverts the following commit:
??? commit
59f301046b276f87483b3afa3201a4273def06a9??? Author: Carolyn Wyborny <[email protected]> ??? Date:?? Wed Oct 10 04:42:59 2012 +0000??? igb: Update get cable length function for i210/i211
Cc Carolyn Wyborny <[email protected]>Signed-off-by Aaron Sierra <[email protected]>Quoted 8 lines
---
?drivers/net/ethernet/intel/igb/e1000_82575.c | 13 ++--- ?drivers/net/ethernet/intel/igb/e1000_i210.c? |? 5 +- ?drivers/net/ethernet/intel/igb/e1000_i210.h? |? 2 +- ?drivers/net/ethernet/intel/igb/e1000_phy.c?? | 82 +---------------------------
?drivers/net/ethernet/intel/igb/e1000_phy.h?? | 15 +---- ?5 files changed, 11 insertions(+), 106 deletions(-)
Quoted 5 lines
Other than patch 4 of your series, the rest of the series touch code which we "share" with our various other drivers. ?We would need you to assign copyright back to Intel for patches 1, 2, 3 & 5 so that would retain copyright on the changes so that we can re-license the changes for our other drivers.
That isn't a problem. Do you need a statement any more explicit or official than that?
-Aaron
Brown
PATCH 1/5 igb: Remove GS40G specific defines/functions
In reply to Jeff KirsherQuoted 14 lines · Aaron Sierra
The I210 internal PHY can be accessed just as well with the access functions shared by 82580, I350, and I354 devices. A side effect of relying on the common functions, is that I210 cable length support is folded back into the common case which effectively reverts the following commit:
commit
59f301046b276f87483b3afa3201a4273def06a9
Author: Carolyn Wyborny <[email protected]>
Date: Wed Oct 10 04:42:59 2012 +0000igb: Update get cable length function for i210/i211
Cc Carolyn Wyborny <[email protected]>Signed-off-by Aaron Sierra <[email protected]>
Quoted 8 lines
--- drivers/net/ethernet/intel/igb/e1000_82575.c | 13 ++--- drivers/net/ethernet/intel/igb/e1000_i210.c |? 5 +- drivers/net/ethernet/intel/igb/e1000_i210.h |? 2 +- drivers/net/ethernet/intel/igb/e1000_phy.c | 82 +----------------- ---------- drivers/net/ethernet/intel/igb/e1000_phy.h | 15 +---- 5 files changed, 11 insertions(+), 106 deletions(-)