Date: Wed, 2 Dec 2015 23:41:15 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r291662 - in projects/intel_net_refactor/sys: amd64/conf conf dev/e1000 dev/e1000e i386/conf modules modules/em modules/lem Message-ID: <201512022341.tB2NfFaw068381@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Wed Dec 2 23:41:15 2015 New Revision: 291662 URL: https://svnweb.freebsd.org/changeset/base/291662 Log: Very carefully, seperate lem/em from each other into a e1000/e1000e hierarchy. This lays the groundwork for doing vendor imports of the drivers that Intel releases. Added: projects/intel_net_refactor/sys/dev/e1000e/ - copied from r291556, projects/intel_net_refactor/sys/dev/e1000/ projects/intel_net_refactor/sys/dev/e1000e/e1000e_80003es2lan.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_80003es2lan.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_80003es2lan.h - copied unchanged from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_80003es2lan.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_82540.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_82540.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_82541.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_82541.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_82541.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_82541.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_82542.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_82542.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_82543.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_82543.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_82543.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_82543.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_82571.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_82571.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_82571.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_82571.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_82575.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_82575.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_api.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_api.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_api.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_api.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_defines.h - copied unchanged from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_defines.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_hw.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_hw.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_i210.h - copied unchanged from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_i210.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_ich8lan.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_ich8lan.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_ich8lan.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_ich8lan.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_mac.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_mac.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_mac.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_mac.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_manage.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_manage.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_manage.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_manage.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_mbx.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_mbx.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_mbx.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_mbx.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_nvm.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_nvm.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_nvm.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_nvm.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_osdep.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_osdep.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_osdep.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_osdep.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_phy.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_phy.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_phy.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_phy.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_regs.h - copied unchanged from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_regs.h projects/intel_net_refactor/sys/dev/e1000e/e1000e_vf.c - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_vf.c projects/intel_net_refactor/sys/dev/e1000e/e1000e_vf.h - copied, changed from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_vf.h projects/intel_net_refactor/sys/modules/lem/ - copied from r291556, projects/intel_net_refactor/sys/modules/em/ Deleted: projects/intel_net_refactor/sys/dev/e1000/LICENSE projects/intel_net_refactor/sys/dev/e1000/README projects/intel_net_refactor/sys/dev/e1000/if_em.c projects/intel_net_refactor/sys/dev/e1000/if_em.h projects/intel_net_refactor/sys/dev/e1000e/LICENSE projects/intel_net_refactor/sys/dev/e1000e/README projects/intel_net_refactor/sys/dev/e1000e/e1000_80003es2lan.c projects/intel_net_refactor/sys/dev/e1000e/e1000_80003es2lan.h projects/intel_net_refactor/sys/dev/e1000e/e1000_82540.c projects/intel_net_refactor/sys/dev/e1000e/e1000_82541.c projects/intel_net_refactor/sys/dev/e1000e/e1000_82541.h projects/intel_net_refactor/sys/dev/e1000e/e1000_82542.c projects/intel_net_refactor/sys/dev/e1000e/e1000_82543.c projects/intel_net_refactor/sys/dev/e1000e/e1000_82543.h projects/intel_net_refactor/sys/dev/e1000e/e1000_82571.c projects/intel_net_refactor/sys/dev/e1000e/e1000_82571.h projects/intel_net_refactor/sys/dev/e1000e/e1000_82575.h projects/intel_net_refactor/sys/dev/e1000e/e1000_api.c projects/intel_net_refactor/sys/dev/e1000e/e1000_api.h projects/intel_net_refactor/sys/dev/e1000e/e1000_defines.h projects/intel_net_refactor/sys/dev/e1000e/e1000_hw.h projects/intel_net_refactor/sys/dev/e1000e/e1000_i210.h projects/intel_net_refactor/sys/dev/e1000e/e1000_ich8lan.c projects/intel_net_refactor/sys/dev/e1000e/e1000_ich8lan.h projects/intel_net_refactor/sys/dev/e1000e/e1000_mac.c projects/intel_net_refactor/sys/dev/e1000e/e1000_mac.h projects/intel_net_refactor/sys/dev/e1000e/e1000_manage.c projects/intel_net_refactor/sys/dev/e1000e/e1000_manage.h projects/intel_net_refactor/sys/dev/e1000e/e1000_mbx.c projects/intel_net_refactor/sys/dev/e1000e/e1000_mbx.h projects/intel_net_refactor/sys/dev/e1000e/e1000_nvm.c projects/intel_net_refactor/sys/dev/e1000e/e1000_nvm.h projects/intel_net_refactor/sys/dev/e1000e/e1000_osdep.c projects/intel_net_refactor/sys/dev/e1000e/e1000_osdep.h projects/intel_net_refactor/sys/dev/e1000e/e1000_phy.c projects/intel_net_refactor/sys/dev/e1000e/e1000_phy.h projects/intel_net_refactor/sys/dev/e1000e/e1000_regs.h projects/intel_net_refactor/sys/dev/e1000e/e1000_vf.c projects/intel_net_refactor/sys/dev/e1000e/e1000_vf.h projects/intel_net_refactor/sys/dev/e1000e/if_lem.c projects/intel_net_refactor/sys/dev/e1000e/if_lem.h Modified: projects/intel_net_refactor/sys/amd64/conf/GENERIC projects/intel_net_refactor/sys/conf/files projects/intel_net_refactor/sys/dev/e1000e/if_em.c projects/intel_net_refactor/sys/dev/e1000e/if_em.h projects/intel_net_refactor/sys/i386/conf/GENERIC projects/intel_net_refactor/sys/modules/Makefile projects/intel_net_refactor/sys/modules/em/Makefile projects/intel_net_refactor/sys/modules/lem/Makefile Modified: projects/intel_net_refactor/sys/amd64/conf/GENERIC ============================================================================== --- projects/intel_net_refactor/sys/amd64/conf/GENERIC Wed Dec 2 23:36:14 2015 (r291661) +++ projects/intel_net_refactor/sys/amd64/conf/GENERIC Wed Dec 2 23:41:15 2015 (r291662) @@ -229,6 +229,7 @@ device ixv # Intel PRO/10GbE PCIE VF device ixl # Intel XL710 40Gbe PCIE Ethernet device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet +device lem # Intel PRO/1000 Legacy Gigabit Ethernet Family device ti # Alteon Networks Tigon I/II gigabit Ethernet device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') Modified: projects/intel_net_refactor/sys/conf/files ============================================================================== --- projects/intel_net_refactor/sys/conf/files Wed Dec 2 23:36:14 2015 (r291661) +++ projects/intel_net_refactor/sys/conf/files Wed Dec 2 23:41:15 2015 (r291662) @@ -1335,39 +1335,71 @@ dev/ed/if_ed_pccard.c optional ed pccar dev/ed/if_ed_pci.c optional ed pci dev/eisa/eisa_if.m standard dev/eisa/eisaconf.c optional eisa -dev/e1000/if_em.c optional em \ - compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/if_lem.c optional em \ + +dev/e1000e/if_em.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_ich8lan.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_80003es2lan.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_82540.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_82541.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_82542.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_82543.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_82571.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_api.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_mac.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_manage.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_nvm.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_phy.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_vf.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_mbx.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" +dev/e1000e/e1000e_osdep.c optional em \ + compile-with "${NORMAL_C} -I$S/dev/e1000e" + +dev/e1000/if_lem.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_80003es2lan.c optional em \ +dev/e1000/e1000_80003es2lan.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82540.c optional em \ +dev/e1000/e1000_82540.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82541.c optional em \ +dev/e1000/e1000_82541.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82542.c optional em \ +dev/e1000/e1000_82542.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82543.c optional em \ +dev/e1000/e1000_82543.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82571.c optional em \ +dev/e1000/e1000_82571.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_ich8lan.c optional em \ +dev/e1000/e1000_api.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_api.c optional em \ +dev/e1000/e1000_mac.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_mac.c optional em \ +dev/e1000/e1000_manage.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_manage.c optional em \ +dev/e1000/e1000_nvm.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_nvm.c optional em \ +dev/e1000/e1000_phy.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_phy.c optional em \ +dev/e1000/e1000_mbx.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_vf.c optional em \ +dev/e1000/e1000_osdep.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_mbx.c optional em \ +dev/e1000/e1000_vf.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_osdep.c optional em \ +dev/e1000/e1000_ich8lan.c optional lem \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/igb/if_igb.c optional igb \ Copied and modified: projects/intel_net_refactor/sys/dev/e1000e/e1000e_80003es2lan.c (from r291556, projects/intel_net_refactor/sys/dev/e1000/e1000_80003es2lan.c) ============================================================================== --- projects/intel_net_refactor/sys/dev/e1000/e1000_80003es2lan.c Tue Dec 1 04:15:34 2015 (r291556, copy source) +++ projects/intel_net_refactor/sys/dev/e1000e/e1000e_80003es2lan.c Wed Dec 2 23:41:15 2015 (r291662) @@ -36,41 +36,41 @@ * 80003ES2LAN Gigabit Ethernet Controller (Serdes) */ -#include "e1000_api.h" +#include "e1000e_api.h" -static s32 e1000_acquire_phy_80003es2lan(struct e1000_hw *hw); -static void e1000_release_phy_80003es2lan(struct e1000_hw *hw); -static s32 e1000_acquire_nvm_80003es2lan(struct e1000_hw *hw); -static void e1000_release_nvm_80003es2lan(struct e1000_hw *hw); -static s32 e1000_read_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, +static s32 e1000e_acquire_phy_80003es2lan(struct e1000_hw *hw); +static void e1000e_release_phy_80003es2lan(struct e1000_hw *hw); +static s32 e1000e_acquire_nvm_80003es2lan(struct e1000_hw *hw); +static void e1000e_release_nvm_80003es2lan(struct e1000_hw *hw); +static s32 e1000e_read_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, u32 offset, u16 *data); -static s32 e1000_write_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, +static s32 e1000e_write_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, u32 offset, u16 data); -static s32 e1000_write_nvm_80003es2lan(struct e1000_hw *hw, u16 offset, +static s32 e1000e_write_nvm_80003es2lan(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); -static s32 e1000_get_cfg_done_80003es2lan(struct e1000_hw *hw); -static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw); -static s32 e1000_get_cable_length_80003es2lan(struct e1000_hw *hw); -static s32 e1000_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed, +static s32 e1000e_get_cfg_done_80003es2lan(struct e1000_hw *hw); +static s32 e1000e_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw); +static s32 e1000e_get_cable_length_80003es2lan(struct e1000_hw *hw); +static s32 e1000e_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed, u16 *duplex); -static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw); -static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw); -static s32 e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw); -static void e1000_clear_hw_cntrs_80003es2lan(struct e1000_hw *hw); -static s32 e1000_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); -static s32 e1000_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex); -static s32 e1000_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw); -static s32 e1000_cfg_on_link_up_80003es2lan(struct e1000_hw *hw); -static s32 e1000_read_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, +static s32 e1000e_reset_hw_80003es2lan(struct e1000_hw *hw); +static s32 e1000e_init_hw_80003es2lan(struct e1000_hw *hw); +static s32 e1000e_setup_copper_link_80003es2lan(struct e1000_hw *hw); +static void e1000e_clear_hw_cntrs_80003es2lan(struct e1000_hw *hw); +static s32 e1000e_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); +static s32 e1000e_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex); +static s32 e1000e_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw); +static s32 e1000e_cfg_on_link_up_80003es2lan(struct e1000_hw *hw); +static s32 e1000e_read_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, u16 *data); -static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, +static s32 e1000e_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, u16 data); -static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw); -static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); -static s32 e1000_read_mac_addr_80003es2lan(struct e1000_hw *hw); -static void e1000_power_down_phy_copper_80003es2lan(struct e1000_hw *hw); +static void e1000e_initialize_hw_bits_80003es2lan(struct e1000_hw *hw); +static void e1000e_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); +static s32 e1000e_read_mac_addr_80003es2lan(struct e1000_hw *hw); +static void e1000e_power_down_phy_copper_80003es2lan(struct e1000_hw *hw); /* A table for the GG82563 cable length where the range is defined * with a lower bound at "index" and the upper bound at @@ -86,7 +86,7 @@ static const u16 e1000_gg82563_cable_len * e1000_init_phy_params_80003es2lan - Init ESB2 PHY func ptrs. * @hw: pointer to the HW structure **/ -static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_init_phy_params_80003es2lan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; s32 ret_val; @@ -97,8 +97,8 @@ static s32 e1000_init_phy_params_80003es phy->type = e1000_phy_none; return E1000_SUCCESS; } else { - phy->ops.power_up = e1000_power_up_phy_copper; - phy->ops.power_down = e1000_power_down_phy_copper_80003es2lan; + phy->ops.power_up = e1000e_power_up_phy_copper; + phy->ops.power_down = e1000e_power_down_phy_copper_80003es2lan; } phy->addr = 1; @@ -106,25 +106,25 @@ static s32 e1000_init_phy_params_80003es phy->reset_delay_us = 100; phy->type = e1000_phy_gg82563; - phy->ops.acquire = e1000_acquire_phy_80003es2lan; - phy->ops.check_polarity = e1000_check_polarity_m88; - phy->ops.check_reset_block = e1000_check_reset_block_generic; - phy->ops.commit = e1000_phy_sw_reset_generic; - phy->ops.get_cfg_done = e1000_get_cfg_done_80003es2lan; - phy->ops.get_info = e1000_get_phy_info_m88; - phy->ops.release = e1000_release_phy_80003es2lan; - phy->ops.reset = e1000_phy_hw_reset_generic; - phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_generic; - - phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_80003es2lan; - phy->ops.get_cable_length = e1000_get_cable_length_80003es2lan; - phy->ops.read_reg = e1000_read_phy_reg_gg82563_80003es2lan; - phy->ops.write_reg = e1000_write_phy_reg_gg82563_80003es2lan; + phy->ops.acquire = e1000e_acquire_phy_80003es2lan; + phy->ops.check_polarity = e1000e_check_polarity_m88; + phy->ops.check_reset_block = e1000e_check_reset_block_generic; + phy->ops.commit = e1000e_phy_sw_reset_generic; + phy->ops.get_cfg_done = e1000e_get_cfg_done_80003es2lan; + phy->ops.get_info = e1000e_get_phy_info_m88; + phy->ops.release = e1000e_release_phy_80003es2lan; + phy->ops.reset = e1000e_phy_hw_reset_generic; + phy->ops.set_d3_lplu_state = e1000e_set_d3_lplu_state_generic; + + phy->ops.force_speed_duplex = e1000e_phy_force_speed_duplex_80003es2lan; + phy->ops.get_cable_length = e1000e_get_cable_length_80003es2lan; + phy->ops.read_reg = e1000e_read_phy_reg_gg82563_80003es2lan; + phy->ops.write_reg = e1000e_write_phy_reg_gg82563_80003es2lan; - phy->ops.cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan; + phy->ops.cfg_on_link_up = e1000e_cfg_on_link_up_80003es2lan; /* This can only be done after all function pointers are setup. */ - ret_val = e1000_get_phy_id(hw); + ret_val = e1000e_get_phy_id(hw); /* Verify phy id */ if (phy->id != GG82563_E_PHY_ID) @@ -137,7 +137,7 @@ static s32 e1000_init_phy_params_80003es * e1000_init_nvm_params_80003es2lan - Init ESB2 NVM func ptrs. * @hw: pointer to the HW structure **/ -static s32 e1000_init_nvm_params_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_init_nvm_params_80003es2lan(struct e1000_hw *hw) { struct e1000_nvm_info *nvm = &hw->nvm; u32 eecd = E1000_READ_REG(hw, E1000_EECD); @@ -178,13 +178,13 @@ static s32 e1000_init_nvm_params_80003es nvm->word_size = 1 << size; /* Function Pointers */ - nvm->ops.acquire = e1000_acquire_nvm_80003es2lan; - nvm->ops.read = e1000_read_nvm_eerd; - nvm->ops.release = e1000_release_nvm_80003es2lan; - nvm->ops.update = e1000_update_nvm_checksum_generic; - nvm->ops.valid_led_default = e1000_valid_led_default_generic; - nvm->ops.validate = e1000_validate_nvm_checksum_generic; - nvm->ops.write = e1000_write_nvm_80003es2lan; + nvm->ops.acquire = e1000e_acquire_nvm_80003es2lan; + nvm->ops.read = e1000e_read_nvm_eerd; + nvm->ops.release = e1000e_release_nvm_80003es2lan; + nvm->ops.update = e1000e_update_nvm_checksum_generic; + nvm->ops.valid_led_default = e1000e_valid_led_default_generic; + nvm->ops.validate = e1000e_validate_nvm_checksum_generic; + nvm->ops.write = e1000e_write_nvm_80003es2lan; return E1000_SUCCESS; } @@ -193,7 +193,7 @@ static s32 e1000_init_nvm_params_80003es * e1000_init_mac_params_80003es2lan - Init ESB2 MAC func ptrs. * @hw: pointer to the HW structure **/ -static s32 e1000_init_mac_params_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_init_mac_params_80003es2lan(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; @@ -203,15 +203,15 @@ static s32 e1000_init_mac_params_80003es switch (hw->device_id) { case E1000_DEV_ID_80003ES2LAN_SERDES_DPT: hw->phy.media_type = e1000_media_type_internal_serdes; - mac->ops.check_for_link = e1000_check_for_serdes_link_generic; + mac->ops.check_for_link = e1000e_check_for_serdes_link_generic; mac->ops.setup_physical_interface = - e1000_setup_fiber_serdes_link_generic; + e1000e_setup_fiber_serdes_link_generic; break; default: hw->phy.media_type = e1000_media_type_copper; - mac->ops.check_for_link = e1000_check_for_copper_link_generic; + mac->ops.check_for_link = e1000e_check_for_copper_link_generic; mac->ops.setup_physical_interface = - e1000_setup_copper_link_80003es2lan; + e1000e_setup_copper_link_80003es2lan; break; } @@ -232,38 +232,38 @@ static s32 e1000_init_mac_params_80003es /* Function pointers */ /* bus type/speed/width */ - mac->ops.get_bus_info = e1000_get_bus_info_pcie_generic; + mac->ops.get_bus_info = e1000e_get_bus_info_pcie_generic; /* reset */ - mac->ops.reset_hw = e1000_reset_hw_80003es2lan; + mac->ops.reset_hw = e1000e_reset_hw_80003es2lan; /* hw initialization */ - mac->ops.init_hw = e1000_init_hw_80003es2lan; + mac->ops.init_hw = e1000e_init_hw_80003es2lan; /* link setup */ - mac->ops.setup_link = e1000_setup_link_generic; + mac->ops.setup_link = e1000e_setup_link_generic; /* check management mode */ - mac->ops.check_mng_mode = e1000_check_mng_mode_generic; + mac->ops.check_mng_mode = e1000e_check_mng_mode_generic; /* multicast address update */ - mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_generic; + mac->ops.update_mc_addr_list = e1000e_update_mc_addr_list_generic; /* writing VFTA */ - mac->ops.write_vfta = e1000_write_vfta_generic; + mac->ops.write_vfta = e1000e_write_vfta_generic; /* clearing VFTA */ - mac->ops.clear_vfta = e1000_clear_vfta_generic; + mac->ops.clear_vfta = e1000e_clear_vfta_generic; /* read mac address */ - mac->ops.read_mac_addr = e1000_read_mac_addr_80003es2lan; + mac->ops.read_mac_addr = e1000e_read_mac_addr_80003es2lan; /* ID LED init */ - mac->ops.id_led_init = e1000_id_led_init_generic; + mac->ops.id_led_init = e1000e_id_led_init_generic; /* blink LED */ - mac->ops.blink_led = e1000_blink_led_generic; + mac->ops.blink_led = e1000e_blink_led_generic; /* setup LED */ - mac->ops.setup_led = e1000_setup_led_generic; + mac->ops.setup_led = e1000e_setup_led_generic; /* cleanup LED */ - mac->ops.cleanup_led = e1000_cleanup_led_generic; + mac->ops.cleanup_led = e1000e_cleanup_led_generic; /* turn on/off LED */ - mac->ops.led_on = e1000_led_on_generic; - mac->ops.led_off = e1000_led_off_generic; + mac->ops.led_on = e1000e_led_on_generic; + mac->ops.led_off = e1000e_led_off_generic; /* clear hardware counters */ - mac->ops.clear_hw_cntrs = e1000_clear_hw_cntrs_80003es2lan; + mac->ops.clear_hw_cntrs = e1000e_clear_hw_cntrs_80003es2lan; /* link info */ - mac->ops.get_link_up_info = e1000_get_link_up_info_80003es2lan; + mac->ops.get_link_up_info = e1000e_get_link_up_info_80003es2lan; /* set lan id for port to determine which phy lock to use */ hw->mac.ops.set_lan_id(hw); @@ -277,13 +277,13 @@ static s32 e1000_init_mac_params_80003es * * Called to initialize all function pointers and parameters. **/ -void e1000_init_function_pointers_80003es2lan(struct e1000_hw *hw) +void e1000e_init_function_pointers_80003es2lan(struct e1000_hw *hw) { DEBUGFUNC("e1000_init_function_pointers_80003es2lan"); - hw->mac.ops.init_params = e1000_init_mac_params_80003es2lan; - hw->nvm.ops.init_params = e1000_init_nvm_params_80003es2lan; - hw->phy.ops.init_params = e1000_init_phy_params_80003es2lan; + hw->mac.ops.init_params = e1000e_init_mac_params_80003es2lan; + hw->nvm.ops.init_params = e1000e_init_nvm_params_80003es2lan; + hw->phy.ops.init_params = e1000e_init_phy_params_80003es2lan; } /** @@ -292,14 +292,14 @@ void e1000_init_function_pointers_80003e * * A wrapper to acquire access rights to the correct PHY. **/ -static s32 e1000_acquire_phy_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_acquire_phy_80003es2lan(struct e1000_hw *hw) { u16 mask; DEBUGFUNC("e1000_acquire_phy_80003es2lan"); mask = hw->bus.func ? E1000_SWFW_PHY1_SM : E1000_SWFW_PHY0_SM; - return e1000_acquire_swfw_sync_80003es2lan(hw, mask); + return e1000e_acquire_swfw_sync_80003es2lan(hw, mask); } /** @@ -308,14 +308,14 @@ static s32 e1000_acquire_phy_80003es2lan * * A wrapper to release access rights to the correct PHY. **/ -static void e1000_release_phy_80003es2lan(struct e1000_hw *hw) +static void e1000e_release_phy_80003es2lan(struct e1000_hw *hw) { u16 mask; DEBUGFUNC("e1000_release_phy_80003es2lan"); mask = hw->bus.func ? E1000_SWFW_PHY1_SM : E1000_SWFW_PHY0_SM; - e1000_release_swfw_sync_80003es2lan(hw, mask); + e1000e_release_swfw_sync_80003es2lan(hw, mask); } /** @@ -325,7 +325,7 @@ static void e1000_release_phy_80003es2la * Acquire the semaphore to access the Kumeran interface. * **/ -static s32 e1000_acquire_mac_csr_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_acquire_mac_csr_80003es2lan(struct e1000_hw *hw) { u16 mask; @@ -333,7 +333,7 @@ static s32 e1000_acquire_mac_csr_80003es mask = E1000_SWFW_CSR_SM; - return e1000_acquire_swfw_sync_80003es2lan(hw, mask); + return e1000e_acquire_swfw_sync_80003es2lan(hw, mask); } /** @@ -342,7 +342,7 @@ static s32 e1000_acquire_mac_csr_80003es * * Release the semaphore used to access the Kumeran interface **/ -static void e1000_release_mac_csr_80003es2lan(struct e1000_hw *hw) +static void e1000e_release_mac_csr_80003es2lan(struct e1000_hw *hw) { u16 mask; @@ -350,7 +350,7 @@ static void e1000_release_mac_csr_80003e mask = E1000_SWFW_CSR_SM; - e1000_release_swfw_sync_80003es2lan(hw, mask); + e1000e_release_swfw_sync_80003es2lan(hw, mask); } /** @@ -359,20 +359,20 @@ static void e1000_release_mac_csr_80003e * * Acquire the semaphore to access the EEPROM. **/ -static s32 e1000_acquire_nvm_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_acquire_nvm_80003es2lan(struct e1000_hw *hw) { s32 ret_val; DEBUGFUNC("e1000_acquire_nvm_80003es2lan"); - ret_val = e1000_acquire_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); + ret_val = e1000e_acquire_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); if (ret_val) return ret_val; - ret_val = e1000_acquire_nvm_generic(hw); + ret_val = e1000e_acquire_nvm_generic(hw); if (ret_val) - e1000_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); + e1000e_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); return ret_val; } @@ -383,12 +383,12 @@ static s32 e1000_acquire_nvm_80003es2lan * * Release the semaphore used to access the EEPROM. **/ -static void e1000_release_nvm_80003es2lan(struct e1000_hw *hw) +static void e1000e_release_nvm_80003es2lan(struct e1000_hw *hw) { DEBUGFUNC("e1000_release_nvm_80003es2lan"); - e1000_release_nvm_generic(hw); - e1000_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); + e1000e_release_nvm_generic(hw); + e1000e_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); } /** @@ -399,7 +399,7 @@ static void e1000_release_nvm_80003es2la * Acquire the SW/FW semaphore to access the PHY or NVM. The mask * will also specify which port we're acquiring the lock for. **/ -static s32 e1000_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask) +static s32 e1000e_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask) { u32 swfw_sync; u32 swmask = mask; @@ -410,7 +410,7 @@ static s32 e1000_acquire_swfw_sync_80003 DEBUGFUNC("e1000_acquire_swfw_sync_80003es2lan"); while (i < timeout) { - if (e1000_get_hw_semaphore_generic(hw)) + if (e1000e_get_hw_semaphore_generic(hw)) return -E1000_ERR_SWFW_SYNC; swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); @@ -420,7 +420,7 @@ static s32 e1000_acquire_swfw_sync_80003 /* Firmware currently using resource (fwmask) * or other software thread using resource (swmask) */ - e1000_put_hw_semaphore_generic(hw); + e1000e_put_hw_semaphore_generic(hw); msec_delay_irq(5); i++; } @@ -433,7 +433,7 @@ static s32 e1000_acquire_swfw_sync_80003 swfw_sync |= swmask; E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); - e1000_put_hw_semaphore_generic(hw); + e1000e_put_hw_semaphore_generic(hw); return E1000_SUCCESS; } @@ -446,20 +446,20 @@ static s32 e1000_acquire_swfw_sync_80003 * Release the SW/FW semaphore used to access the PHY or NVM. The mask * will also specify which port we're releasing the lock for. **/ -static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask) +static void e1000e_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask) { u32 swfw_sync; DEBUGFUNC("e1000_release_swfw_sync_80003es2lan"); - while (e1000_get_hw_semaphore_generic(hw) != E1000_SUCCESS) + while (e1000e_get_hw_semaphore_generic(hw) != E1000_SUCCESS) ; /* Empty */ swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); swfw_sync &= ~mask; E1000_WRITE_REG(hw, E1000_SW_FW_SYNC, swfw_sync); - e1000_put_hw_semaphore_generic(hw); + e1000e_put_hw_semaphore_generic(hw); } /** @@ -470,7 +470,7 @@ static void e1000_release_swfw_sync_8000 * * Read the GG82563 PHY register. **/ -static s32 e1000_read_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, +static s32 e1000e_read_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, u32 offset, u16 *data) { s32 ret_val; @@ -479,7 +479,7 @@ static s32 e1000_read_phy_reg_gg82563_80 DEBUGFUNC("e1000_read_phy_reg_gg82563_80003es2lan"); - ret_val = e1000_acquire_phy_80003es2lan(hw); + ret_val = e1000e_acquire_phy_80003es2lan(hw); if (ret_val) return ret_val; @@ -494,9 +494,9 @@ static s32 e1000_read_phy_reg_gg82563_80 } temp = (u16)((u16)offset >> GG82563_PAGE_SHIFT); - ret_val = e1000_write_phy_reg_mdic(hw, page_select, temp); + ret_val = e1000e_write_phy_reg_mdic(hw, page_select, temp); if (ret_val) { - e1000_release_phy_80003es2lan(hw); + e1000e_release_phy_80003es2lan(hw); return ret_val; } @@ -508,27 +508,27 @@ static s32 e1000_read_phy_reg_gg82563_80 usec_delay(200); /* ...and verify the command was successful. */ - ret_val = e1000_read_phy_reg_mdic(hw, page_select, &temp); + ret_val = e1000e_read_phy_reg_mdic(hw, page_select, &temp); if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) { - e1000_release_phy_80003es2lan(hw); + e1000e_release_phy_80003es2lan(hw); return -E1000_ERR_PHY; } usec_delay(200); - ret_val = e1000_read_phy_reg_mdic(hw, + ret_val = e1000e_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, data); usec_delay(200); } else { - ret_val = e1000_read_phy_reg_mdic(hw, + ret_val = e1000e_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, data); } - e1000_release_phy_80003es2lan(hw); + e1000e_release_phy_80003es2lan(hw); return ret_val; } @@ -541,7 +541,7 @@ static s32 e1000_read_phy_reg_gg82563_80 * * Write to the GG82563 PHY register. **/ -static s32 e1000_write_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, +static s32 e1000e_write_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw, u32 offset, u16 data) { s32 ret_val; @@ -550,7 +550,7 @@ static s32 e1000_write_phy_reg_gg82563_8 DEBUGFUNC("e1000_write_phy_reg_gg82563_80003es2lan"); - ret_val = e1000_acquire_phy_80003es2lan(hw); + ret_val = e1000e_acquire_phy_80003es2lan(hw); if (ret_val) return ret_val; @@ -565,9 +565,9 @@ static s32 e1000_write_phy_reg_gg82563_8 } temp = (u16)((u16)offset >> GG82563_PAGE_SHIFT); - ret_val = e1000_write_phy_reg_mdic(hw, page_select, temp); + ret_val = e1000e_write_phy_reg_mdic(hw, page_select, temp); if (ret_val) { - e1000_release_phy_80003es2lan(hw); + e1000e_release_phy_80003es2lan(hw); return ret_val; } @@ -579,27 +579,27 @@ static s32 e1000_write_phy_reg_gg82563_8 usec_delay(200); /* ...and verify the command was successful. */ - ret_val = e1000_read_phy_reg_mdic(hw, page_select, &temp); + ret_val = e1000e_read_phy_reg_mdic(hw, page_select, &temp); if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) { - e1000_release_phy_80003es2lan(hw); + e1000e_release_phy_80003es2lan(hw); return -E1000_ERR_PHY; } usec_delay(200); - ret_val = e1000_write_phy_reg_mdic(hw, + ret_val = e1000e_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, data); usec_delay(200); } else { - ret_val = e1000_write_phy_reg_mdic(hw, + ret_val = e1000e_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, data); } - e1000_release_phy_80003es2lan(hw); + e1000e_release_phy_80003es2lan(hw); return ret_val; } @@ -613,12 +613,12 @@ static s32 e1000_write_phy_reg_gg82563_8 * * Write "words" of data to the ESB2 NVM. **/ -static s32 e1000_write_nvm_80003es2lan(struct e1000_hw *hw, u16 offset, +static s32 e1000e_write_nvm_80003es2lan(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) { DEBUGFUNC("e1000_write_nvm_80003es2lan"); - return e1000_write_nvm_spi(hw, offset, words, data); + return e1000e_write_nvm_spi(hw, offset, words, data); } /** @@ -628,7 +628,7 @@ static s32 e1000_write_nvm_80003es2lan(s * Wait a specific amount of time for manageability processes to complete. * This is a function pointer entry point called by the phy module. **/ -static s32 e1000_get_cfg_done_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_get_cfg_done_80003es2lan(struct e1000_hw *hw) { s32 timeout = PHY_CFG_TIMEOUT; u32 mask = E1000_NVM_CFG_DONE_PORT_0; @@ -659,7 +659,7 @@ static s32 e1000_get_cfg_done_80003es2la * Force the speed and duplex settings onto the PHY. This is a * function pointer entry point called by the phy module. **/ -static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw) { s32 ret_val; u16 phy_data; @@ -688,7 +688,7 @@ static s32 e1000_phy_force_speed_duplex_ if (ret_val) return ret_val; - e1000_phy_force_speed_duplex_setup(hw, &phy_data); + e1000e_phy_force_speed_duplex_setup(hw, &phy_data); /* Reset the phy to commit changes. */ phy_data |= MII_CR_RESET; @@ -702,7 +702,7 @@ static s32 e1000_phy_force_speed_duplex_ if (hw->phy.autoneg_wait_to_complete) { DEBUGOUT("Waiting for forced speed/duplex link on GG82563 phy.\n"); - ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT, + ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, 100000, &link); if (ret_val) return ret_val; @@ -711,13 +711,13 @@ static s32 e1000_phy_force_speed_duplex_ /* We didn't get link. * Reset the DSP and cross our fingers. */ - ret_val = e1000_phy_reset_dsp_generic(hw); + ret_val = e1000e_phy_reset_dsp_generic(hw); if (ret_val) return ret_val; } /* Try once more */ - ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT, + ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, 100000, &link); if (ret_val) return ret_val; @@ -754,7 +754,7 @@ static s32 e1000_phy_force_speed_duplex_ * Find the approximate cable length as measured by the GG82563 PHY. * This is a function pointer entry point called by the phy module. **/ -static s32 e1000_get_cable_length_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_get_cable_length_80003es2lan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; s32 ret_val; @@ -790,7 +790,7 @@ static s32 e1000_get_cable_length_80003e * * Retrieve the current speed and duplex configuration. **/ -static s32 e1000_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed, +static s32 e1000e_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed, u16 *duplex) { s32 ret_val; @@ -798,11 +798,11 @@ static s32 e1000_get_link_up_info_80003e DEBUGFUNC("e1000_get_link_up_info_80003es2lan"); if (hw->phy.media_type == e1000_media_type_copper) { - ret_val = e1000_get_speed_and_duplex_copper_generic(hw, speed, + ret_val = e1000e_get_speed_and_duplex_copper_generic(hw, speed, duplex); hw->phy.ops.cfg_on_link_up(hw); } else { - ret_val = e1000_get_speed_and_duplex_fiber_serdes_generic(hw, + ret_val = e1000e_get_speed_and_duplex_fiber_serdes_generic(hw, speed, duplex); } @@ -816,7 +816,7 @@ static s32 e1000_get_link_up_info_80003e * * Perform a global reset to the ESB2 controller. **/ -static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_reset_hw_80003es2lan(struct e1000_hw *hw) { u32 ctrl; s32 ret_val; @@ -827,7 +827,7 @@ static s32 e1000_reset_hw_80003es2lan(st /* Prevent the PCI-E bus from sticking if there is no TLP connection * on the last TLP read/write transaction when MAC is reset. */ - ret_val = e1000_disable_pcie_master_generic(hw); + ret_val = e1000e_disable_pcie_master_generic(hw); if (ret_val) DEBUGOUT("PCI-E Master disable polling has failed.\n"); @@ -842,22 +842,22 @@ static s32 e1000_reset_hw_80003es2lan(st ctrl = E1000_READ_REG(hw, E1000_CTRL); - ret_val = e1000_acquire_phy_80003es2lan(hw); + ret_val = e1000e_acquire_phy_80003es2lan(hw); if (ret_val) return ret_val; DEBUGOUT("Issuing a global reset to MAC\n"); E1000_WRITE_REG(hw, E1000_CTRL, ctrl | E1000_CTRL_RST); - e1000_release_phy_80003es2lan(hw); + e1000e_release_phy_80003es2lan(hw); /* Disable IBIST slave mode (far-end loopback) */ - e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + e1000e_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, &kum_reg_data); kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; - e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + e1000e_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, kum_reg_data); - ret_val = e1000_get_auto_rd_done_generic(hw); + ret_val = e1000e_get_auto_rd_done_generic(hw); if (ret_val) /* We don't want to continue accessing MAC registers. */ return ret_val; @@ -866,7 +866,7 @@ static s32 e1000_reset_hw_80003es2lan(st E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); E1000_READ_REG(hw, E1000_ICR); - return e1000_check_alt_mac_addr_generic(hw); + return e1000e_check_alt_mac_addr_generic(hw); } /** @@ -875,7 +875,7 @@ static s32 e1000_reset_hw_80003es2lan(st * * Initialize the hw bits, LED, VFTA, MTA, link and hw counters. **/ -static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_init_hw_80003es2lan(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; u32 reg_data; @@ -885,7 +885,7 @@ static s32 e1000_init_hw_80003es2lan(str DEBUGFUNC("e1000_init_hw_80003es2lan"); - e1000_initialize_hw_bits_80003es2lan(hw); + e1000e_initialize_hw_bits_80003es2lan(hw); /* Initialize identification LED */ ret_val = mac->ops.id_led_init(hw); @@ -898,7 +898,7 @@ static s32 e1000_init_hw_80003es2lan(str mac->ops.clear_vfta(hw); /* Setup the receive address. */ - e1000_init_rx_addrs_generic(hw, mac->rar_entry_count); + e1000e_init_rx_addrs_generic(hw, mac->rar_entry_count); /* Zero out the Multicast HASH table */ DEBUGOUT("Zeroing the MTA\n"); @@ -911,10 +911,10 @@ static s32 e1000_init_hw_80003es2lan(str return ret_val; /* Disable IBIST slave mode (far-end loopback) */ - e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + e1000e_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, &kum_reg_data); kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; - e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + e1000e_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, kum_reg_data); /* Set the transmit descriptor write-back policy */ @@ -954,7 +954,7 @@ static s32 e1000_init_hw_80003es2lan(str hw->dev_spec._80003es2lan.mdic_wa_enable = TRUE; ret_val = - e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_OFFSET >> + e1000e_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_OFFSET >> E1000_KMRNCTRLSTA_OFFSET_SHIFT, &i); if (!ret_val) { if ((i & E1000_KMRNCTRLSTA_OPMODE_MASK) == @@ -967,7 +967,7 @@ static s32 e1000_init_hw_80003es2lan(str * because the symbol error count will increment wildly if there * is no link. */ - e1000_clear_hw_cntrs_80003es2lan(hw); + e1000e_clear_hw_cntrs_80003es2lan(hw); return ret_val; } @@ -978,7 +978,7 @@ static s32 e1000_init_hw_80003es2lan(str * * Initializes required hardware-dependent bits needed for normal operation. **/ -static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw) +static void e1000e_initialize_hw_bits_80003es2lan(struct e1000_hw *hw) { u32 reg; @@ -1025,7 +1025,7 @@ static void e1000_initialize_hw_bits_800 * * Setup some GG82563 PHY registers for obtaining link **/ -static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; s32 ret_val; @@ -1097,16 +1097,16 @@ static s32 e1000_copper_link_setup_gg825 reg = E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL; data = (E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS | E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS); - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, reg, data); + ret_val = e1000e_write_kmrn_reg_80003es2lan(hw, reg, data); if (ret_val) return ret_val; reg = E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE; - ret_val = e1000_read_kmrn_reg_80003es2lan(hw, reg, &data); + ret_val = e1000e_read_kmrn_reg_80003es2lan(hw, reg, &data); if (ret_val) return ret_val; data |= E1000_KMRNCTRLSTA_OPMODE_E_IDLE; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, reg, data); + ret_val = e1000e_write_kmrn_reg_80003es2lan(hw, reg, data); if (ret_val) return ret_val; @@ -1173,7 +1173,7 @@ static s32 e1000_copper_link_setup_gg825 * Essentially a wrapper for setting up all things "copper" related. * This is a function pointer entry point called by the mac module. **/ -static s32 e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_setup_copper_link_80003es2lan(struct e1000_hw *hw) { u32 ctrl; s32 ret_val; @@ -1190,38 +1190,38 @@ static s32 e1000_setup_copper_link_80003 * iteration and increase the max iterations when * polling the phy; this fixes erroneous timeouts at 10Mbps. */ - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 4), + ret_val = e1000e_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 4), 0xFFFF); if (ret_val) return ret_val; - ret_val = e1000_read_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9), + ret_val = e1000e_read_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9), ®_data); if (ret_val) return ret_val; reg_data |= 0x3F; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9), + ret_val = e1000e_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9), reg_data); if (ret_val) return ret_val; ret_val = - e1000_read_kmrn_reg_80003es2lan(hw, + e1000e_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, ®_data); if (ret_val) return ret_val; reg_data |= E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING; ret_val = - e1000_write_kmrn_reg_80003es2lan(hw, + e1000e_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, reg_data); if (ret_val) return ret_val; - ret_val = e1000_copper_link_setup_gg82563_80003es2lan(hw); + ret_val = e1000e_copper_link_setup_gg82563_80003es2lan(hw); if (ret_val) return ret_val; - return e1000_setup_copper_link_generic(hw); + return e1000e_setup_copper_link_generic(hw); } /** @@ -1232,7 +1232,7 @@ static s32 e1000_setup_copper_link_80003 * Configure the KMRN interface by applying last minute quirks for * 10/100 operation. **/ -static s32 e1000_cfg_on_link_up_80003es2lan(struct e1000_hw *hw) +static s32 e1000e_cfg_on_link_up_80003es2lan(struct e1000_hw *hw) { s32 ret_val = E1000_SUCCESS; u16 speed; @@ -1241,15 +1241,15 @@ static s32 e1000_cfg_on_link_up_80003es2 DEBUGFUNC("e1000_configure_on_link_up"); if (hw->phy.media_type == e1000_media_type_copper) { - ret_val = e1000_get_speed_and_duplex_copper_generic(hw, &speed, + ret_val = e1000e_get_speed_and_duplex_copper_generic(hw, &speed, &duplex); if (ret_val) return ret_val; if (speed == SPEED_1000) - ret_val = e1000_cfg_kmrn_1000_80003es2lan(hw); + ret_val = e1000e_cfg_kmrn_1000_80003es2lan(hw); else - ret_val = e1000_cfg_kmrn_10_100_80003es2lan(hw, duplex); + ret_val = e1000e_cfg_kmrn_10_100_80003es2lan(hw, duplex); } return ret_val; @@ -1263,7 +1263,7 @@ static s32 e1000_cfg_on_link_up_80003es2 * Configure the KMRN interface by applying last minute quirks for * 10/100 operation. *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512022341.tB2NfFaw068381>