e1000e: cleanup ethtool loopback setup code
Subsystems (2)
PATCH 1/8 e1000e: cleanup ethtool loopback setup code
From: Bruce Allan <[email protected]>
Refactor the loopback setup code to first handle the only 10/100 PHY supported by the driver if applicable and then handle the 1Gig PHYs in a switch statement for PHY-specific setups.
---
drivers/net/e1000e/ethtool.c | 74 ++++++++++++++++++++++++------------------ 1 files changed, 42 insertions(+), 32 deletions(-)
drivers/net/e1000e/ethtool.c +42 -32
@@ -1263,33 +1263,36 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter) hw->mac.autoneg =0 ; -/* Workaround: K1 must be disabled for stable 1Gbps operation */ -if (hw->mac.type == e1000_pchlan) -e1000_configure_k1_ich8lan (hw, false); - -if (hw->phy.type == e1000_phy_m88) { -/* Auto-MDI/MDIX Off */ -e1e_wphy (hw,M88E1000_PHY_SPEC_CTRL ,0x0808 ); -/* reset to update Auto-MDI/MDIX */ -e1e_wphy (hw,PHY_CONTROL ,0x9140 ); -/* autoneg off */ -e1e_wphy (hw,PHY_CONTROL ,0x8140 ); - }else if (hw->phy.type == e1000_phy_gg82563) -e1e_wphy (hw,GG82563_PHY_KMRN_MODE_CTRL ,0x1CC ); - - ctrl_reg =er32 (CTRL ); - -switch (hw->phy.type) { -case e1000_phy_ife: +if (hw->phy.type == e1000_phy_ife) {/* force 100, set loopback */ e1e_wphy (hw,PHY_CONTROL ,0x6100 );/* Now set up the MAC to the same speed/duplex as the PHY. */ + ctrl_reg =er32 (CTRL ); ctrl_reg &= ~E1000_CTRL_SPD_SEL ;/* Clear the speed sel bits */ ctrl_reg |= (E1000_CTRL_FRCSPD |/* Set the Force Speed Bit */ E1000_CTRL_FRCDPX |/* Set the Force Duplex Bit */ E1000_CTRL_SPD_100 |/* Force Speed to 100 */ E1000_CTRL_FD );/* Force Duplex to FULL */ + +ew32 (CTRL , ctrl_reg); +udelay (500 ); + +return 0 ; + } + +/* Specific PHY configuration for loopback */ +switch (hw->phy.type) { +case e1000_phy_m88: +/* Auto-MDI/MDIX Off */ +e1e_wphy (hw,M88E1000_PHY_SPEC_CTRL ,0x0808 ); +/* reset to update Auto-MDI/MDIX */ +e1e_wphy (hw,PHY_CONTROL ,0x9140 ); +/* autoneg off */ +e1e_wphy (hw,PHY_CONTROL ,0x8140 ); +break ; +case e1000_phy_gg82563: +e1e_wphy (hw,GG82563_PHY_KMRN_MODE_CTRL ,0x1CC );break ;case e1000_phy_bm:/* Set Default MAC Interface speed to 1GB */
@@ -1312,23 +1315,30 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter)/* Set Early Link Enable */ e1e_rphy (hw,PHY_REG (769 ,20 ), &phy_reg);e1e_wphy (hw,PHY_REG (769 ,20 ), phy_reg |0x0400 ); -/* fall through */ +break ; +case e1000_phy_82577: +case e1000_phy_82578: +/* Workaround: K1 must be disabled for stable 1Gbps operation */ +e1000_configure_k1_ich8lan (hw, false); +break ;default : -/* force 1000, set loopback */ -e1e_wphy (hw,PHY_CONTROL ,0x4140 ); -mdelay (250 ); +break ; + } -/* Now set up the MAC to the same speed/duplex as the PHY. */ - ctrl_reg =er32 (CTRL ); - ctrl_reg &= ~E1000_CTRL_SPD_SEL ;/* Clear the speed sel bits */ - ctrl_reg |= (E1000_CTRL_FRCSPD |/* Set the Force Speed Bit */ -E1000_CTRL_FRCDPX |/* Set the Force Duplex Bit */ -E1000_CTRL_SPD_1000 |/* Force Speed to 1000 */ -E1000_CTRL_FD );/* Force Duplex to FULL */ +/* force 1000, set loopback */ +e1e_wphy (hw,PHY_CONTROL ,0x4140 ); +mdelay (250 ); -if (adapter->flags &FLAG_IS_ICH ) - ctrl_reg |=E1000_CTRL_SLU ;/* Set Link Up */ - } +/* Now set up the MAC to the same speed/duplex as the PHY. */ + ctrl_reg =er32 (CTRL ); + ctrl_reg &= ~E1000_CTRL_SPD_SEL ;/* Clear the speed sel bits */ + ctrl_reg |= (E1000_CTRL_FRCSPD |/* Set the Force Speed Bit */ +E1000_CTRL_FRCDPX |/* Set the Force Duplex Bit */ +E1000_CTRL_SPD_1000 |/* Force Speed to 1000 */ +E1000_CTRL_FD );/* Force Duplex to FULL */ + +if (adapter->flags &FLAG_IS_ICH ) + ctrl_reg |=E1000_CTRL_SLU ;/* Set Link Up */ if (hw->phy.media_type == e1000_media_type_copper && hw->phy.type == e1000_phy_m88) {
PATCH 2/8 e1000e: cleanup e1000_sw_lcd_config_ich8lan()
From: Bruce Allan <[email protected]>
Do not acquire and release the PHY unnecessarily for parts that return from this workaround without actually accessing the PHY registers.
---
drivers/net/e1000e/ich8lan.c | 32 +++++++++++++++++++------------- 1 files changed, 19 insertions(+), 13 deletions(-)
drivers/net/e1000e/ich8lan.c +19 -13
@@ -820,14 +820,6 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)s32 ret_val =0 ;u16 word_addr, reg_data, reg_addr, phy_page =0 ; -if (!(hw->mac.type == e1000_ich8lan && phy->type == e1000_phy_igp_3) && - !(hw->mac.type == e1000_pchlan)) -return ret_val; - - ret_val = hw->phy.ops.acquire (hw); -if (ret_val) -return ret_val; -/* * Initialize the PHY from the NVM on ICH platforms. This * is needed due to an issue where the NVM configuration is
@@ -835,12 +827,26 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)* Therefore, after each PHY reset, we will load the * configuration data out of the NVM manually. */ -if ((adapter->pdev->device ==E1000_DEV_ID_ICH8_IGP_M_AMT ) || - (adapter->pdev->device ==E1000_DEV_ID_ICH8_IGP_M ) || - (hw->mac.type == e1000_pchlan)) +switch (hw->mac.type) { +case e1000_ich8lan: +if (phy->type != e1000_phy_igp_3) +return ret_val; + +if (adapter->pdev->device ==E1000_DEV_ID_ICH8_IGP_AMT ) { + sw_cfg_mask =E1000_FEXTNVM_SW_CONFIG ; +break ; + } +/* Fall-thru */ +case e1000_pchlan: sw_cfg_mask =E1000_FEXTNVM_SW_CONFIG_ICH8M ; -else - sw_cfg_mask =E1000_FEXTNVM_SW_CONFIG ; +break ; +default : +return ret_val; + } + + ret_val = hw->phy.ops.acquire (hw); +if (ret_val) +return ret_val; data =er32 (FEXTNVM );if (!(data & sw_cfg_mask))
PATCH 3/8 e1000e: separate out PHY statistics register updates
In reply to Jeff KirsherFrom: Bruce Allan <[email protected]>
The 82577/82578 parts have half-duplex statistics in PHY registers. These need only be read when in half-duplex and should all be read at once rather than one at a time to prevent excessive cycles of acquiring/releasing the PHY semaphore.
---
drivers/net/e1000e/e1000.h | 1 drivers/net/e1000e/ich8lan.c | 1 drivers/net/e1000e/netdev.c | 171 ++++++++++++++++++++++++++++++------------ 3 files changed, 126 insertions(+), 47 deletions(-)
drivers/net/e1000e/e1000.h +1 -0
@@ -421,6 +421,7 @@ struct e1000_info {#define FLAG2_HAS_PHY_WAKEUP (1 << 1)#define FLAG2_IS_DISCARDING (1 << 2)#define FLAG2_DISABLE_ASPM_L1 (1 << 3) +#define FLAG2_HAS_PHY_STATS (1 << 4)#define E1000_RX_DESC_PS (R , i) \ (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
drivers/net/e1000e/ich8lan.c +1 -0
@@ -3503,6 +3503,7 @@ struct e1000_info e1000_pch_info = { | FLAG_HAS_JUMBO_FRAMES |FLAG_DISABLE_FC_PAUSE_TIME /* errata */ | FLAG_APME_IN_WUC, + .flags2 = FLAG2_HAS_PHY_STATS, .pba = 26, .max_hw_frame_size = 4096, .get_variants = e1000_get_variants_ich8lan,
drivers/net/e1000e/netdev.c +124 -47
199 lines not on this page · raw message
PATCH 4/8 e1000e: fix check for manageability on ICHx/PCH
In reply to Jeff KirsherFrom: Bruce Allan <[email protected]>
Do not check for all the bits in E1000_FWSM_MODE_MASK when checking for manageability on 82577/82578; only check if iAMT is enabled. Both of the manageability checks (for 82577/82578 and ICHx) must check the firmware valid bit too since the other bits are only valid when the latter is set.
---
drivers/net/e1000e/ich8lan.c | 31 +++++++++++++++++++++++++++---- 1 files changed, 27 insertions(+), 4 deletions(-)
drivers/net/e1000e/ich8lan.c +27 -4
@@ -226,6 +226,8 @@ static void e1000_power_down_phy_copper_ich8lan(struct e1000_hw *hw);static void e1000_lan_init_done_ich8lan (struct e1000_hw *hw);static s32 e1000_k1_gig_workaround_hv (struct e1000_hw *hw,bool link);static s32 e1000_set_mdio_slow_mode_hv (struct e1000_hw *hw); +static bool e1000_check_mng_mode_ich8lan (struct e1000_hw *hw); +static bool e1000_check_mng_mode_pchlan (struct e1000_hw *hw);static inline u16 __er16flash (struct e1000_hw *hw,unsigned long reg) {
@@ -515,6 +517,8 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_adapter *adapter)case e1000_ich8lan:case e1000_ich9lan:case e1000_ich10lan: +/* check management mode */ + mac->ops.check_mng_mode = e1000_check_mng_mode_ich8lan;/* ID LED init */ mac->ops.id_led_init = e1000e_id_led_init;/* setup LED */
@@ -526,6 +530,8 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_adapter *adapter) mac->ops.led_off = e1000_led_off_ich8lan;break ;case e1000_pchlan: +/* check management mode */ + mac->ops.check_mng_mode = e1000_check_mng_mode_pchlan;/* ID LED init */ mac->ops.id_led_init = e1000_id_led_init_pchlan;/* setup LED */
@@ -774,7 +780,7 @@ static void e1000_release_swflag_ich8lan(struct e1000_hw *hw)* e1000_check_mng_mode_ich8lan - Checks management mode * @hw: pointer to the HW structure * -* This checks if the adapter has manageability enabled. +* This checks if the adapter has any manageability enabled. * This is a function pointer entry point only called by read/write * routines for the PHY and NVM parts. **/
@@ -783,9 +789,26 @@ static bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw)u32 fwsm; fwsm =er32 (FWSM ); +return (fwsm &E1000_ICH_FWSM_FW_VALID ) && + ((fwsm &E1000_FWSM_MODE_MASK ) == + (E1000_ICH_MNG_IAMT_MODE <<E1000_FWSM_MODE_SHIFT )); +} -return (fwsm &E1000_FWSM_MODE_MASK ) == - (E1000_ICH_MNG_IAMT_MODE <<E1000_FWSM_MODE_SHIFT ); +/** +* e1000_check_mng_mode_pchlan - Checks management mode +* @hw: pointer to the HW structure +* +* This checks if the adapter has iAMT enabled. +* This is a function pointer entry point only called by read/write +* routines for the PHY and NVM parts. +**/ +static bool e1000_check_mng_mode_pchlan (struct e1000_hw *hw) +{ +u32 fwsm; + + fwsm =er32 (FWSM ); +return (fwsm &E1000_ICH_FWSM_FW_VALID ) && + (fwsm & (E1000_ICH_MNG_IAMT_MODE <<E1000_FWSM_MODE_SHIFT )); }/**
@@ -3396,7 +3419,7 @@ static void e1000_clear_hw_cntrs_ich8lan(struct e1000_hw *hw)static struct e1000_mac_operations ich8_mac_ops = { .id_led_init = e1000e_id_led_init, - .check_mng_mode = e1000_check_mng_mode_ich8lan, +/* check_mng_mode dependent on mac type */ .check_for_link = e1000_check_for_copper_link_ich8lan,/* cleanup_led dependent on mac type */ .clear_hw_cntrs = e1000_clear_hw_cntrs_ich8lan,
PATCH 5/8 e1000e: initial support for 82579 LOMs
In reply to Jeff KirsherFrom: Bruce Allan <[email protected]>
---
drivers/net/e1000e/defines.h | 2 drivers/net/e1000e/e1000.h | 4 + drivers/net/e1000e/ethtool.c | 13 ++ drivers/net/e1000e/hw.h | 12 +- drivers/net/e1000e/ich8lan.c | 328 ++++++++++++++++++++++++++++++++++++++++-- drivers/net/e1000e/netdev.c | 70 ++++++--- drivers/net/e1000e/phy.c | 3 7 files changed, 386 insertions(+), 46 deletions(-)
drivers/net/e1000e/defines.h +2 -0
@@ -359,6 +359,7 @@#define E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE 0x00000001#define E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE 0x00000008#define E1000_EXTCNF_CTRL_SWFLAG 0x00000020 +#define E1000_EXTCNF_CTRL_GATE_PHY_CFG 0x00000080#define E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_MASK 0x00FF0000#define E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_SHIFT 16#define E1000_EXTCNF_CTRL_EXT_CNF_POINTER_MASK 0x0FFF0000
@@ -714,6 +715,7 @@#define BME1000_E_PHY_ID_R2 0x01410CB1#define I82577_E_PHY_ID 0x01540050#define I82578_E_PHY_ID 0x004DD040 +#define I82579_E_PHY_ID 0x01540090/* M88E1000 Specific Registers */ #define M88E1000_PHY_SPEC_CTRL 0x10/* PHY Specific Control Register */
drivers/net/e1000e/e1000.h +4 -0
@@ -164,6 +164,7 @@ enum e1000_boards { board_ich9lan, board_ich10lan, board_pchlan, + board_pch2lan, }; struct e1000_queue_stats {
@@ -477,6 +478,7 @@ extern struct e1000_info e1000_ich8_info;extern struct e1000_info e1000_ich9_info;extern struct e1000_info e1000_ich10_info;extern struct e1000_info e1000_pch_info; +extern struct e1000_info e1000_pch2_info;extern struct e1000_info e1000_es2_info;extern s32 e1000e_read_pba_num (struct e1000_hw *hw,u32 *pba_num);
@@ -495,6 +497,8 @@ extern void e1000e_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw);extern void e1000e_gig_downshift_workaround_ich8lan (struct e1000_hw *hw);extern void e1000e_disable_gig_wol_ich8lan (struct e1000_hw *hw);extern s32 e1000_configure_k1_ich8lan (struct e1000_hw *hw,bool k1_enable); +extern s32 e1000_lv_jumbo_workaround_ich8lan (struct e1000_hw *hw,bool enable); +extern void e1000_copy_rx_addrs_to_phy_ich8lan (struct e1000_hw *hw);extern s32 e1000e_check_for_copper_link (struct e1000_hw *hw);extern s32 e1000e_check_for_fiber_link (struct e1000_hw *hw);
drivers/net/e1000e/ethtool.c +13 -0
@@ -880,6 +880,7 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)switch (mac->type) {case e1000_ich10lan:case e1000_pchlan: +case e1000_pch2lan: mask |= (1 <<18 );break ;default :
@@ -1321,6 +1322,17 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter)/* Workaround: K1 must be disabled for stable 1Gbps operation */ e1000_configure_k1_ich8lan (hw, false);break ; +case e1000_phy_82579: +/* Disable PHY energy detect power down */ +e1e_rphy (hw,PHY_REG (0 ,21 ), &phy_reg); +e1e_wphy (hw,PHY_REG (0 ,21 ), phy_reg & ~(1 <<3 )); +/* Disable full chip energy detect */ +e1e_rphy (hw,PHY_REG (776 ,18 ), &phy_reg); +e1e_wphy (hw,PHY_REG (776 ,18 ), phy_reg |1 ); +/* Enable loopback on the PHY */ +#define I82577_PHY_LBK_CTRL 19 +e1e_wphy (hw,I82577_PHY_LBK_CTRL ,0x8001 ); +break ;default :break ; }
@@ -1878,6 +1890,7 @@ static int e1000_phys_id(struct net_device *netdev, u32 data)if ((hw->phy.type == e1000_phy_ife) || (hw->mac.type == e1000_pchlan) || + (hw->mac.type == e1000_pch2lan) || (hw->mac.type == e1000_82583) || (hw->mac.type == e1000_82574)) {INIT_WORK (&adapter->led_blink_task, e1000e_led_blink_task);
drivers/net/e1000e/hw.h +10 -2
@@ -217,7 +217,10 @@ enum e1e_registers {E1000_SWSM =0x05B50 ,/* SW Semaphore */ E1000_FWSM =0x05B54 ,/* FW Semaphore */ E1000_SWSM2 =0x05B58 ,/* Driver-only SW semaphore */ -E1000_CRC_OFFSET =0x05F50 ,/* CRC Offset register */ +E1000_FFLT_DBG =0x05F04 ,/* Debug Register */ +E1000_PCH_RAICC_BASE =0x05F50 ,/* Receive Address Initial CRC */ +#define E1000_PCH_RAICC(_n) (E1000_PCH_RAICC_BASE + ((_n) * 4)) +#define E1000_CRC_OFFSET E1000_PCH_RAICC_BASE E1000_HICR = 0x08F00, /* Host Interface Control */ };
@@ -303,13 +306,14 @@ enum e1e_registers {#define E1000_KMRNCTRLSTA_OFFSET 0x001F0000#define E1000_KMRNCTRLSTA_OFFSET_SHIFT 16#define E1000_KMRNCTRLSTA_REN 0x00200000 +#define E1000_KMRNCTRLSTA_CTRL_OFFSET 0x1/* Kumeran Control */ #define E1000_KMRNCTRLSTA_DIAG_OFFSET 0x3/* Kumeran Diagnostic */ #define E1000_KMRNCTRLSTA_TIMEOUTS 0x4/* Kumeran Timeouts */ #define E1000_KMRNCTRLSTA_INBAND_PARAM 0x9/* Kumeran InBand Parameters */ #define E1000_KMRNCTRLSTA_DIAG_NELPBK 0x1000/* Nearend Loopback mode */ #define E1000_KMRNCTRLSTA_K1_CONFIG 0x7#define E1000_KMRNCTRLSTA_K1_ENABLE 0x140E -#define E1000_KMRNCTRLSTA_K1_DISABLE 0x1400 +#define E1000_KMRNCTRLSTA_HD_CTRL 0x0002#define IFE_PHY_EXTENDED_STATUS_CONTROL 0x10#define IFE_PHY_SPECIAL_CONTROL 0x11/* 100BaseTx PHY Special Control */
@@ -387,6 +391,8 @@ enum e1e_registers {#define E1000_DEV_ID_PCH_M_HV_LC 0x10EB#define E1000_DEV_ID_PCH_D_HV_DM 0x10EF#define E1000_DEV_ID_PCH_D_HV_DC 0x10F0 +#define E1000_DEV_ID_PCH2_LV_LM 0x1502 +#define E1000_DEV_ID_PCH2_LV_V 0x1503#define E1000_REVISION_4 4
@@ -406,6 +412,7 @@ enum e1000_mac_type { e1000_ich9lan, e1000_ich10lan, e1000_pchlan, + e1000_pch2lan, }; enum e1000_media_type {
@@ -442,6 +449,7 @@ enum e1000_phy_type { e1000_phy_bm, e1000_phy_82578, e1000_phy_82577, + e1000_phy_82579, }; enum e1000_bus_width {
drivers/net/e1000e/ich8lan.c +311 -17
440 lines not on this page · raw message
drivers/net/e1000e/netdev.c +43 -27
108 lines not on this page · raw message
drivers/net/e1000e/phy.c +3 -0
@@ -2319,6 +2319,9 @@ enum e1000_phy_type e1000e_get_phy_type_from_id(u32 phy_id)case I82577_E_PHY_ID : phy_type = e1000_phy_82577;break ; +case I82579_E_PHY_ID : + phy_type = e1000_phy_82579; +break ;default : phy_type = e1000_phy_unknown;break ;
PATCH 6/8 e1000e: enable support for EEE on 82579
In reply to Jeff KirsherFrom: Bruce Allan <[email protected]>
This patch enables IEEE802.3az (a.k.a. Energy Efficient Ethernet) on the new 82579 LOMs. An optional module parameter is provided to disable the feature if desired.
---
drivers/net/e1000e/e1000.h | 1 + drivers/net/e1000e/hw.h | 1 + drivers/net/e1000e/ich8lan.c | 41 ++++++++++++++++++++++++++++++++++++++++- drivers/net/e1000e/param.c | 28 ++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 1 deletions(-)
drivers/net/e1000e/e1000.h +1 -0
@@ -423,6 +423,7 @@ struct e1000_info {#define FLAG2_IS_DISCARDING (1 << 2)#define FLAG2_DISABLE_ASPM_L1 (1 << 3)#define FLAG2_HAS_PHY_STATS (1 << 4) +#define FLAG2_HAS_EEE (1 << 5)#define E1000_RX_DESC_PS (R , i) \ (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
drivers/net/e1000e/hw.h +1 -0
@@ -937,6 +937,7 @@ struct e1000_dev_spec_ich8lan {bool kmrn_lock_loss_workaround_enabled;struct e1000_shadow_ram shadow_ram[E1000_ICH8_SHADOW_RAM_WORDS ];bool nvm_k1_enabled; +bool eee_disable; };struct e1000_hw {
drivers/net/e1000e/ich8lan.c +40 -1
65 lines not on this page · raw message
drivers/net/e1000e/param.c +28 -0
@@ -161,6 +161,15 @@ E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can leaE1000_PARAM (CrcStripping,"Enable CRC Stripping, disable if your BMC needs " \"the CRC" ); +/* +* Enable/disable EEE (a.k.a. IEEE802.3az) +* +* Valid Range: 0, 1 +* +* Default Value: 1 +*/ +E1000_PARAM (EEE ,"Enable/disable on parts that support the feature" ); +struct e1000_option {enum { enable_option, range_option, list_option } type;const char *name;
@@ -477,4 +486,23 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) } } } + {/* EEE for parts supporting the feature */ +static const struct e1000_option opt = { + .type = enable_option, + .name ="EEE Support" , + .err ="defaulting to Enabled" , + .def =OPTION_ENABLED + }; + +if (adapter->flags2 &FLAG2_HAS_EEE ) { +/* Currently only supported on 82579 */ +if (num_EEE > bd) { +unsigned int eee =EEE [bd]; +e1000_validate_option (&eee, &opt, adapter); + hw->dev_spec.ich8lan.eee_disable = !eee; + }else { + hw->dev_spec.ich8lan.eee_disable = !opt.def; + } + } + } }
Re: [net-next-2.6 PATCH 6/8] e1000e: enable support for EEE on 82579
Quoted 5 lines · Jeff Kirsher
From: Bruce Allan <[email protected]>
This patch enables IEEE802.3az (a.k.a. Energy Efficient Ethernet) on the new 82579 LOMs. An optional module parameter is provided to disable the feature if desired.
[...]
IEEE802.3az has not been finalised and I heard that some significant changes are still required relative to the latest draft. Given that, any current implementation may not be interoperable with PHYs that implement the final standard and it doesn't seem like a great idea to enable it by default.
Ben.
Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
PATCH 7/8 e1000e: update copyright information
In reply to Jeff KirsherFrom: Bruce Allan <[email protected]>
---
drivers/net/e1000e/82571.c | 2 +- drivers/net/e1000e/defines.h | 2 +- drivers/net/e1000e/e1000.h | 2 +- drivers/net/e1000e/es2lan.c | 2 +- drivers/net/e1000e/ethtool.c | 2 +- drivers/net/e1000e/hw.h | 2 +- drivers/net/e1000e/ich8lan.c | 2 +- drivers/net/e1000e/lib.c | 2 +- drivers/net/e1000e/netdev.c | 4 ++-- drivers/net/e1000e/param.c | 2 +- drivers/net/e1000e/phy.c | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-)
drivers/net/e1000e/82571.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/e1000e/defines.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/e1000e/e1000.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/e1000e/es2lan.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/e1000e/ethtool.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/e1000e/hw.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/e1000e/ich8lan.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/e1000e/lib.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/e1000e/netdev.c +2 -2
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
@@ -6028,7 +6028,7 @@ static int __init e1000_init_module(void)int ret;pr_info ("Intel(R) PRO/1000 Network Driver - %s\n" , e1000e_driver_version); -pr_info ("Copyright (c) 1999 - 2009 Intel Corporation.\n" ); +pr_info ("Copyright (c) 1999 - 2010 Intel Corporation.\n" ); ret =pci_register_driver (&e1000_driver);return ret;
drivers/net/e1000e/param.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
drivers/net/e1000e/phy.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************************* Intel PRO/1000 Linux driver -Copyright(c) 1999 - 2009 Intel Corporation. +Copyright(c) 1999 - 2010 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
PATCH 8/8 e1000e: update driver version number
In reply to Jeff KirsherFrom: Bruce Allan <[email protected]>
Also separate out an _EXTRAVERSION similar to the core kernel.
---
drivers/net/e1000e/netdev.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/e1000e/netdev.c +3 -1
@@ -52,7 +52,9 @@#include "e1000.h" -#define DRV_VERSION "1.0.2-k4" +#define DRV_EXTRAVERSION "-k2" + +#define DRV_VERSION "1.2.7" DRV_EXTRAVERSIONchar e1000e_driver_name[] ="e1000e" ;const char e1000e_driver_version[] =DRV_VERSION ;
David Miller
maintainerI've applied this series however:
1) Please address Ben's concerns about turning EEE on by default given that standardization is not complete yet.
2) I hate module parameters, I'd rather you create a new ethtool feature bit and thus allow the setting to be modified at run time. Please create a new ethtool control flag, and remove this module option.
Thanks.
Quoted 6 lines · David Miller
I've applied this series however:
1) Please address Ben's concerns about turning EEE on by default given that standardization is not complete yet.
Quoted 7 lines
2) I hate module parameters, I'd rather you create a new ethtool feature bit and thus allow the setting to be modified at run time. Please create a new ethtool control flag, and remove this module option.
Thanks.
--
Thank you Dave. I know that Bruce (and company) are actively looking into your first point. I would think that he would have either a response or update on the status come Monday/Tuesday.
Regarding option 2, understood and I will work out with Bruce on when and who will do the work. I will be taking a look at it tomorrow (later today), if I am not able to come up with a patch in the near future. I will return to working on it by Wednesday.
Signature · 2 lines
Cheers, Jeff
David Miller
maintainerFrom: Jeff Kirsher <[email protected]>
Date: Sun, 20 Jun 2010 00:32:20 -0700
Quoted 8 lines
I know that Bruce (and company) are actively looking into your first point. I would think that he would have either a response or update on the status come Monday/Tuesday.
Regarding option 2, understood and I will work out with Bruce on when and who will do the work. I will be taking a look at it tomorrow (later today), if I am not able to come up with a patch in the near future. I will return to working on it by Wednesday.
Great, thanks for letting me know it's being looked at.
Quoted 11 lines · David Miller
I've applied this series however:
1) Please address Ben's concerns about turning EEE on by default given that standardization is not complete yet.
2) I hate module parameters, I'd rather you create a new ethtool feature bit and thus allow the setting to be modified at run time. Please create a new ethtool control flag, and remove this module option.
Thanks.
Hi Dave,
I've been looking into your request number 2 above (as a reminder, it had to do with a patch I submitted that added a module parameter to e1000e in order to enable/disable Energy Efficient Ethernet for a particular type of adapter).
For this new ethtool feature bit/flag for EEE, would you prefer it be set via:
1) the generic parameter setting option (e.g. -s ethX [eee on|off]),
2) yet another new show/change option pair, or
3) a new option that can set this new feature and be expandable to future features that are likewise not related to existing ethtool options (e.g. -F [eee on|off] [whizbang on|off])?
For #2 or #3, it makes sense to use ethtool_op_[g|s]et_flags with new ETH_FLAG_<feature> and NETIF_F_<feature> defines, but #1 can be implemented that way or by using remaining reserved elements of struct ethtool_cmd - if your preference is for #1, would you prefer it be implemented with the former or latter?
Thanks,
Bruce.
David Miller
maintainerFrom: "Allan, Bruce W" <[email protected]>
Date: Wed, 30 Jun 2010 15:41:19 -0700
Quoted 10 lines
I've been looking into your request number 2 above (as a reminder, it had to do with a patch I submitted that added a module parameter to e1000e in order to enable/disable Energy Efficient Ethernet for a particular type of adapter).
For this new ethtool feature bit/flag for EEE, would you prefer it be set via:
1) the generic parameter setting option (e.g. -s ethX [eee on|off]),
2) yet another new show/change option pair, or
3) a new option that can set this new feature and be expandable to future features that are likewise not related to existing ethtool options (e.g. -F [eee on|off] [whizbang on|off])?
Quoted 5 lines
For #2 or #3, it makes sense to use ethtool_op_[g|s]et_flags with new ETH_FLAG_<feature> and NETIF_F_<feature> defines, but #1 can be implemented that way or by using remaining reserved elements of struct
ethtool_cmd- if your preference is for #1, would you prefer it be implemented with the former or latter?
I only have strong feelings about the kernel side, and an ETH_FLAG_* seems best for this since other devices will have this feature too.
I don't think overloading parts of ethtool_cmd is wise.
Quoted 20 lines · Bruce W
Quoted 11 lines · David Miller
I've applied this series however:
1) Please address Ben's concerns about turning EEE on by default given that standardization is not complete yet.
2) I hate module parameters, I'd rather you create a new ethtool feature bit and thus allow the setting to be modified at run time. Please create a new ethtool control flag, and remove this module option.
Thanks.
Hi Dave,
I've been looking into your request number 2 above (as a reminder, it had to do with a patch I submitted that added a module parameter to e1000e in order to enable/disable Energy Efficient Ethernet for a particular type of adapter).
Quoted 7 lines
For this new ethtool feature bit/flag for EEE, would you prefer it be set via:
1) the generic parameter setting option (e.g. -s ethX [eee on|off]),
2) yet another new show/change option pair, or
3) a new option that can set this new feature and be expandable to future features that are likewise not related to existing ethtool options (e.g. -F [eee on|off] [whizbang on|off])?
The ethtool utility is maintained by Jeff Garzik, not David.
Quoted 5 lines
For #2 or #3, it makes sense to use ethtool_op_[g|s]et_flags with new ETH_FLAG_<feature> and NETIF_F_<feature> defines, but #1 can be implemented that way or by using remaining reserved elements of struct
ethtool_cmd- if your preference is for #1, would you prefer it be implemented with the former or latter?
I don't think this belongs in the netdev features because it's nothing that the networking stack needs to care about. It could go in the ethtool flags though currently the ethtool utility assumes those are only for protocol offload/acceleration features.
Ben.
Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.