#include "e1000_api.h"Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| s32 | e1000_init_mac_params (struct e1000_hw *hw) |
| e1000_init_mac_params - Initialize MAC function pointers : pointer to the HW structure | |
| s32 | e1000_init_nvm_params (struct e1000_hw *hw) |
| e1000_init_nvm_params - Initialize NVM function pointers : pointer to the HW structure | |
| s32 | e1000_init_phy_params (struct e1000_hw *hw) |
| e1000_init_phy_params - Initialize PHY function pointers : pointer to the HW structure | |
| s32 | e1000_set_mac_type (struct e1000_hw *hw) |
| e1000_set_mac_type - Sets MAC type : pointer to the HW structure | |
| s32 | e1000_setup_init_funcs (struct e1000_hw *hw, bool init_device) |
| e1000_setup_init_funcs - Initializes function pointers : pointer to the HW structure : true will initialize the rest of the function pointers getting the device ready for use. | |
| s32 | e1000_get_bus_info (struct e1000_hw *hw) |
| e1000_get_bus_info - Obtain bus information for adapter : pointer to the HW structure | |
| void | e1000_clear_vfta (struct e1000_hw *hw) |
| e1000_clear_vfta - Clear VLAN filter table : pointer to the HW structure | |
| void | e1000_write_vfta (struct e1000_hw *hw, u32 offset, u32 value) |
| e1000_write_vfta - Write value to VLAN filter table : pointer to the HW structure : the 32-bit offset in which to write the value to. | |
| void | e1000_update_mc_addr_list (struct e1000_hw *hw, u8 *mc_addr_list, u32 mc_addr_count) |
| e1000_update_mc_addr_list - Update Multicast addresses : pointer to the HW structure : array of multicast addresses to program : number of multicast addresses to program | |
| s32 | e1000_force_mac_fc (struct e1000_hw *hw) |
| e1000_force_mac_fc - Force MAC flow control : pointer to the HW structure | |
| s32 | e1000_check_for_link (struct e1000_hw *hw) |
| e1000_check_for_link - Check/Store link connection : pointer to the HW structure | |
| s32 | e1000_reset_hw (struct e1000_hw *hw) |
| e1000_reset_hw - Reset hardware : pointer to the HW structure | |
| s32 | e1000_init_hw (struct e1000_hw *hw) |
| e1000_init_hw - Initialize hardware : pointer to the HW structure | |
| s32 | e1000_setup_link (struct e1000_hw *hw) |
| e1000_setup_link - Configures link and flow control : pointer to the HW structure | |
| s32 | e1000_get_speed_and_duplex (struct e1000_hw *hw, u16 *speed, u16 *duplex) |
| e1000_get_speed_and_duplex - Returns current speed and duplex : pointer to the HW structure : pointer to a 16-bit value to store the speed : pointer to a 16-bit value to store the duplex. | |
| s32 | e1000_setup_led (struct e1000_hw *hw) |
| e1000_setup_led - Configures SW controllable LED : pointer to the HW structure | |
| s32 | e1000_cleanup_led (struct e1000_hw *hw) |
| e1000_cleanup_led - Restores SW controllable LED : pointer to the HW structure | |
| s32 | e1000_blink_led (struct e1000_hw *hw) |
| e1000_blink_led - Blink SW controllable LED : pointer to the HW structure | |
| s32 | e1000_id_led_init (struct e1000_hw *hw) |
| e1000_id_led_init - store LED configurations in SW : pointer to the HW structure | |
| s32 | e1000_led_on (struct e1000_hw *hw) |
| e1000_led_on - Turn on SW controllable LED : pointer to the HW structure | |
| s32 | e1000_led_off (struct e1000_hw *hw) |
| e1000_led_off - Turn off SW controllable LED : pointer to the HW structure | |
| void | e1000_reset_adaptive (struct e1000_hw *hw) |
| e1000_reset_adaptive - Reset adaptive IFS : pointer to the HW structure | |
| void | e1000_update_adaptive (struct e1000_hw *hw) |
| e1000_update_adaptive - Update adaptive IFS : pointer to the HW structure | |
| s32 | e1000_disable_pcie_master (struct e1000_hw *hw) |
| e1000_disable_pcie_master - Disable PCI-Express master access : pointer to the HW structure | |
| void | e1000_config_collision_dist (struct e1000_hw *hw) |
| e1000_config_collision_dist - Configure collision distance : pointer to the HW structure | |
| void | e1000_rar_set (struct e1000_hw *hw, u8 *addr, u32 index) |
| e1000_rar_set - Sets a receive address register : pointer to the HW structure : address to set the RAR to : the RAR to set | |
| s32 | e1000_validate_mdi_setting (struct e1000_hw *hw) |
| e1000_validate_mdi_setting - Ensures valid MDI/MDIX SW state : pointer to the HW structure | |
| void | e1000_mta_set (struct e1000_hw *hw, u32 hash_value) |
| e1000_mta_set - Sets multicast table bit : pointer to the HW structure : Multicast hash value. | |
| u32 | e1000_hash_mc_addr (struct e1000_hw *hw, u8 *mc_addr) |
| e1000_hash_mc_addr - Determines address location in multicast table : pointer to the HW structure : Multicast address to hash. | |
| s32 | e1000_wait_autoneg (struct e1000_hw *hw) |
| e1000_wait_autoneg - Waits for autonegotiation completion : pointer to the HW structure | |
| s32 | e1000_check_reset_block (struct e1000_hw *hw) |
| e1000_check_reset_block - Verifies PHY can be reset : pointer to the HW structure | |
| s32 | e1000_read_phy_reg (struct e1000_hw *hw, u32 offset, u16 *data) |
| e1000_read_phy_reg - Reads PHY register : pointer to the HW structure : the register to read : the buffer to store the 16-bit read. | |
| s32 | e1000_write_phy_reg (struct e1000_hw *hw, u32 offset, u16 data) |
| e1000_write_phy_reg - Writes PHY register : pointer to the HW structure : the register to write : the value to write. | |
| void | e1000_release_phy (struct e1000_hw *hw) |
| e1000_release_phy - Generic release PHY : pointer to the HW structure | |
| s32 | e1000_acquire_phy (struct e1000_hw *hw) |
| e1000_acquire_phy - Generic acquire PHY : pointer to the HW structure | |
| s32 | e1000_read_kmrn_reg (struct e1000_hw *hw, u32 offset, u16 *data) |
| e1000_read_kmrn_reg - Reads register using Kumeran interface : pointer to the HW structure : the register to read : the location to store the 16-bit value read. | |
| s32 | e1000_write_kmrn_reg (struct e1000_hw *hw, u32 offset, u16 data) |
| e1000_write_kmrn_reg - Writes register using Kumeran interface : pointer to the HW structure : the register to write : the value to write. | |
| s32 | e1000_get_phy_info (struct e1000_hw *hw) |
| e1000_get_phy_info - Retrieves PHY information from registers : pointer to the HW structure | |
| s32 | e1000_phy_hw_reset (struct e1000_hw *hw) |
| e1000_phy_hw_reset - Hard PHY reset : pointer to the HW structure | |
| s32 | e1000_phy_commit (struct e1000_hw *hw) |
| e1000_phy_commit - Soft PHY reset : pointer to the HW structure | |
| s32 | e1000_set_d0_lplu_state (struct e1000_hw *hw, bool active) |
| e1000_set_d0_lplu_state - Sets low power link up state for D0 : pointer to the HW structure : boolean used to enable/disable lplu | |
| s32 | e1000_set_d3_lplu_state (struct e1000_hw *hw, bool active) |
| e1000_set_d3_lplu_state - Sets low power link up state for D3 : pointer to the HW structure : boolean used to enable/disable lplu | |
| s32 | e1000_read_mac_addr (struct e1000_hw *hw) |
| e1000_read_mac_addr - Reads MAC address : pointer to the HW structure | |
| s32 | e1000_read_pba_num (struct e1000_hw *hw, u32 *pba_num) |
| e1000_read_pba_num - Read device part number : pointer to the HW structure : pointer to device part number | |
| s32 | e1000_validate_nvm_checksum (struct e1000_hw *hw) |
| e1000_validate_nvm_checksum - Verifies NVM (EEPROM) checksum : pointer to the HW structure | |
| s32 | e1000_update_nvm_checksum (struct e1000_hw *hw) |
| e1000_update_nvm_checksum - Updates NVM (EEPROM) checksum : pointer to the HW structure | |
| void | e1000_reload_nvm (struct e1000_hw *hw) |
| e1000_reload_nvm - Reloads EEPROM : pointer to the HW structure | |
| s32 | e1000_read_nvm (struct e1000_hw *hw, u16 offset, u16 words, u16 *data) |
| e1000_read_nvm - Reads NVM (EEPROM) : pointer to the HW structure : the word offset to read : number of 16-bit words to read : pointer to the properly sized buffer for the data. | |
| s32 | e1000_write_nvm (struct e1000_hw *hw, u16 offset, u16 words, u16 *data) |
| e1000_write_nvm - Writes to NVM (EEPROM) : pointer to the HW structure : the word offset to read : number of 16-bit words to write : pointer to the properly sized buffer for the data. | |
| void | e1000_power_up_phy (struct e1000_hw *hw) |
| e1000_power_up_phy - Restores link in case of PHY power down : pointer to the HW structure | |
| void | e1000_power_down_phy (struct e1000_hw *hw) |
| e1000_power_down_phy - Power down PHY : pointer to the HW structure | |
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
e1000_init_mac_params - Initialize MAC function pointers : pointer to the HW structure
This function initializes the function pointers for the MAC set of functions. Called by drivers or by e1000_setup_init_funcs.
Definition at line 40 of file e1000_api.c.
References DEBUGOUT, E1000_ERR_CONFIG, E1000_SUCCESS, e1000_mac_operations::init_params, e1000_hw::mac, and e1000_mac_info::ops.
Referenced by e1000_probe(), and e1000_setup_init_funcs().
00041 { 00042 s32 ret_val = E1000_SUCCESS; 00043 00044 if (hw->mac.ops.init_params) { 00045 ret_val = hw->mac.ops.init_params(hw); 00046 if (ret_val) { 00047 DEBUGOUT("MAC Initialization Error\n"); 00048 goto out; 00049 } 00050 } else { 00051 DEBUGOUT("mac.init_mac_params was NULL\n"); 00052 ret_val = -E1000_ERR_CONFIG; 00053 } 00054 00055 out: 00056 return ret_val; 00057 }
e1000_init_nvm_params - Initialize NVM function pointers : pointer to the HW structure
This function initializes the function pointers for the NVM set of functions. Called by drivers or by e1000_setup_init_funcs.
Definition at line 66 of file e1000_api.c.
References DEBUGOUT, E1000_ERR_CONFIG, E1000_SUCCESS, e1000_nvm_operations::init_params, e1000_hw::nvm, and e1000_nvm_info::ops.
Referenced by e1000_probe(), and e1000_setup_init_funcs().
00067 { 00068 s32 ret_val = E1000_SUCCESS; 00069 00070 if (hw->nvm.ops.init_params) { 00071 ret_val = hw->nvm.ops.init_params(hw); 00072 if (ret_val) { 00073 DEBUGOUT("NVM Initialization Error\n"); 00074 goto out; 00075 } 00076 } else { 00077 DEBUGOUT("nvm.init_nvm_params was NULL\n"); 00078 ret_val = -E1000_ERR_CONFIG; 00079 } 00080 00081 out: 00082 return ret_val; 00083 }
e1000_init_phy_params - Initialize PHY function pointers : pointer to the HW structure
This function initializes the function pointers for the PHY set of functions. Called by drivers or by e1000_setup_init_funcs.
Definition at line 92 of file e1000_api.c.
References DEBUGOUT, E1000_ERR_CONFIG, E1000_SUCCESS, e1000_phy_operations::init_params, e1000_phy_info::ops, and e1000_hw::phy.
Referenced by e1000_probe(), and e1000_setup_init_funcs().
00093 { 00094 s32 ret_val = E1000_SUCCESS; 00095 00096 if (hw->phy.ops.init_params) { 00097 ret_val = hw->phy.ops.init_params(hw); 00098 if (ret_val) { 00099 DEBUGOUT("PHY Initialization Error\n"); 00100 goto out; 00101 } 00102 } else { 00103 DEBUGOUT("phy.init_phy_params was NULL\n"); 00104 ret_val = -E1000_ERR_CONFIG; 00105 } 00106 00107 out: 00108 return ret_val; 00109 }
e1000_set_mac_type - Sets MAC type : pointer to the HW structure
This function sets the mac type of the adapter based on the device ID stored in the hw structure. MUST BE FIRST FUNCTION CALLED (explicitly or through e1000_setup_init_funcs()).
Definition at line 120 of file e1000_api.c.
References DEBUGFUNC, e1000_hw::device_id, e1000_82540, e1000_82541, e1000_82541_rev_2, e1000_82542, e1000_82543, e1000_82544, e1000_82545, e1000_82545_rev_3, e1000_82546, e1000_82546_rev_3, e1000_82547, e1000_82547_rev_2, E1000_DEV_ID_82540EM, E1000_DEV_ID_82540EM_LOM, E1000_DEV_ID_82540EP, E1000_DEV_ID_82540EP_LOM, E1000_DEV_ID_82540EP_LP, E1000_DEV_ID_82541EI, E1000_DEV_ID_82541EI_MOBILE, E1000_DEV_ID_82541ER, E1000_DEV_ID_82541ER_LOM, E1000_DEV_ID_82541GI, E1000_DEV_ID_82541GI_LF, E1000_DEV_ID_82541GI_MOBILE, E1000_DEV_ID_82542, E1000_DEV_ID_82543GC_COPPER, E1000_DEV_ID_82543GC_FIBER, E1000_DEV_ID_82544EI_COPPER, E1000_DEV_ID_82544EI_FIBER, E1000_DEV_ID_82544GC_COPPER, E1000_DEV_ID_82544GC_LOM, E1000_DEV_ID_82545EM_COPPER, E1000_DEV_ID_82545EM_FIBER, E1000_DEV_ID_82545GM_COPPER, E1000_DEV_ID_82545GM_FIBER, E1000_DEV_ID_82545GM_SERDES, E1000_DEV_ID_82546EB_COPPER, E1000_DEV_ID_82546EB_FIBER, E1000_DEV_ID_82546EB_QUAD_COPPER, E1000_DEV_ID_82546GB_COPPER, E1000_DEV_ID_82546GB_FIBER, E1000_DEV_ID_82546GB_PCIE, E1000_DEV_ID_82546GB_QUAD_COPPER, E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3, E1000_DEV_ID_82546GB_SERDES, E1000_DEV_ID_82547EI, E1000_DEV_ID_82547EI_MOBILE, E1000_DEV_ID_82547GI, E1000_ERR_MAC_INIT, E1000_SUCCESS, e1000_hw::mac, and e1000_mac_info::type.
Referenced by e1000_setup_init_funcs().
00121 { 00122 struct e1000_mac_info *mac = &hw->mac; 00123 s32 ret_val = E1000_SUCCESS; 00124 00125 DEBUGFUNC("e1000_set_mac_type"); 00126 00127 switch (hw->device_id) { 00128 case E1000_DEV_ID_82542: 00129 mac->type = e1000_82542; 00130 break; 00131 case E1000_DEV_ID_82543GC_FIBER: 00132 case E1000_DEV_ID_82543GC_COPPER: 00133 mac->type = e1000_82543; 00134 break; 00135 case E1000_DEV_ID_82544EI_COPPER: 00136 case E1000_DEV_ID_82544EI_FIBER: 00137 case E1000_DEV_ID_82544GC_COPPER: 00138 case E1000_DEV_ID_82544GC_LOM: 00139 mac->type = e1000_82544; 00140 break; 00141 case E1000_DEV_ID_82540EM: 00142 case E1000_DEV_ID_82540EM_LOM: 00143 case E1000_DEV_ID_82540EP: 00144 case E1000_DEV_ID_82540EP_LOM: 00145 case E1000_DEV_ID_82540EP_LP: 00146 mac->type = e1000_82540; 00147 break; 00148 case E1000_DEV_ID_82545EM_COPPER: 00149 case E1000_DEV_ID_82545EM_FIBER: 00150 mac->type = e1000_82545; 00151 break; 00152 case E1000_DEV_ID_82545GM_COPPER: 00153 case E1000_DEV_ID_82545GM_FIBER: 00154 case E1000_DEV_ID_82545GM_SERDES: 00155 mac->type = e1000_82545_rev_3; 00156 break; 00157 case E1000_DEV_ID_82546EB_COPPER: 00158 case E1000_DEV_ID_82546EB_FIBER: 00159 case E1000_DEV_ID_82546EB_QUAD_COPPER: 00160 mac->type = e1000_82546; 00161 break; 00162 case E1000_DEV_ID_82546GB_COPPER: 00163 case E1000_DEV_ID_82546GB_FIBER: 00164 case E1000_DEV_ID_82546GB_SERDES: 00165 case E1000_DEV_ID_82546GB_PCIE: 00166 case E1000_DEV_ID_82546GB_QUAD_COPPER: 00167 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: 00168 mac->type = e1000_82546_rev_3; 00169 break; 00170 case E1000_DEV_ID_82541EI: 00171 case E1000_DEV_ID_82541EI_MOBILE: 00172 case E1000_DEV_ID_82541ER_LOM: 00173 mac->type = e1000_82541; 00174 break; 00175 case E1000_DEV_ID_82541ER: 00176 case E1000_DEV_ID_82541GI: 00177 case E1000_DEV_ID_82541GI_LF: 00178 case E1000_DEV_ID_82541GI_MOBILE: 00179 mac->type = e1000_82541_rev_2; 00180 break; 00181 case E1000_DEV_ID_82547EI: 00182 case E1000_DEV_ID_82547EI_MOBILE: 00183 mac->type = e1000_82547; 00184 break; 00185 case E1000_DEV_ID_82547GI: 00186 mac->type = e1000_82547_rev_2; 00187 break; 00188 default: 00189 /* Should never have loaded on this device */ 00190 ret_val = -E1000_ERR_MAC_INIT; 00191 break; 00192 } 00193 00194 return ret_val; 00195 }
e1000_setup_init_funcs - Initializes function pointers : pointer to the HW structure : true will initialize the rest of the function pointers getting the device ready for use.
false will only set MAC type and the function pointers for the other init functions. Passing false will not generate any hardware reads or writes.
This function must be called by a driver in order to use the rest of the 'shared' code files. Called by drivers only.
Definition at line 209 of file e1000_api.c.
References DEBUGOUT, e1000_82540, e1000_82541, e1000_82541_rev_2, e1000_82542, e1000_82543, e1000_82544, e1000_82545, e1000_82545_rev_3, e1000_82546, e1000_82546_rev_3, e1000_82547, e1000_82547_rev_2, E1000_ERR_CONFIG, e1000_init_function_pointers_82540(), e1000_init_function_pointers_82541(), e1000_init_function_pointers_82542(), e1000_init_function_pointers_82543(), e1000_init_mac_ops_generic(), e1000_init_mac_params(), e1000_init_nvm_ops_generic(), e1000_init_nvm_params(), e1000_init_phy_ops_generic(), e1000_init_phy_params(), e1000_set_mac_type(), e1000_hw::hw_addr, e1000_hw::mac, and e1000_mac_info::type.
Referenced by e1000_sw_init().
00210 { 00211 s32 ret_val; 00212 00213 /* Can't do much good without knowing the MAC type. */ 00214 ret_val = e1000_set_mac_type(hw); 00215 if (ret_val) { 00216 DEBUGOUT("ERROR: MAC type could not be set properly.\n"); 00217 goto out; 00218 } 00219 00220 if (!hw->hw_addr) { 00221 DEBUGOUT("ERROR: Registers not mapped\n"); 00222 ret_val = -E1000_ERR_CONFIG; 00223 goto out; 00224 } 00225 00226 /* 00227 * Init function pointers to generic implementations. We do this first 00228 * allowing a driver module to override it afterward. 00229 */ 00230 e1000_init_mac_ops_generic(hw); 00231 e1000_init_phy_ops_generic(hw); 00232 e1000_init_nvm_ops_generic(hw); 00233 00234 /* 00235 * Set up the init function pointers. These are functions within the 00236 * adapter family file that sets up function pointers for the rest of 00237 * the functions in that family. 00238 */ 00239 switch (hw->mac.type) { 00240 case e1000_82542: 00241 e1000_init_function_pointers_82542(hw); 00242 break; 00243 case e1000_82543: 00244 case e1000_82544: 00245 e1000_init_function_pointers_82543(hw); 00246 break; 00247 case e1000_82540: 00248 case e1000_82545: 00249 case e1000_82545_rev_3: 00250 case e1000_82546: 00251 case e1000_82546_rev_3: 00252 e1000_init_function_pointers_82540(hw); 00253 break; 00254 case e1000_82541: 00255 case e1000_82541_rev_2: 00256 case e1000_82547: 00257 case e1000_82547_rev_2: 00258 e1000_init_function_pointers_82541(hw); 00259 break; 00260 default: 00261 DEBUGOUT("Hardware not supported\n"); 00262 ret_val = -E1000_ERR_CONFIG; 00263 break; 00264 } 00265 00266 /* 00267 * Initialize the rest of the function pointers. These require some 00268 * register reads/writes in some cases. 00269 */ 00270 if (!(ret_val) && init_device) { 00271 ret_val = e1000_init_mac_params(hw); 00272 if (ret_val) 00273 goto out; 00274 00275 ret_val = e1000_init_nvm_params(hw); 00276 if (ret_val) 00277 goto out; 00278 00279 ret_val = e1000_init_phy_params(hw); 00280 if (ret_val) 00281 goto out; 00282 } 00283 00284 out: 00285 return ret_val; 00286 }
e1000_get_bus_info - Obtain bus information for adapter : pointer to the HW structure
This will obtain information about the HW bus for which the adapter is attached and stores it in the hw structure. This is a function pointer entry point called by drivers.
Definition at line 296 of file e1000_api.c.
References E1000_SUCCESS, e1000_mac_operations::get_bus_info, e1000_hw::mac, and e1000_mac_info::ops.
00297 { 00298 if (hw->mac.ops.get_bus_info) 00299 return hw->mac.ops.get_bus_info(hw); 00300 00301 return E1000_SUCCESS; 00302 }
| void e1000_clear_vfta | ( | struct e1000_hw * | hw | ) |
e1000_clear_vfta - Clear VLAN filter table : pointer to the HW structure
This clears the VLAN filter table on the adapter. This is a function pointer entry point called by drivers.
Definition at line 311 of file e1000_api.c.
References e1000_mac_operations::clear_vfta, e1000_hw::mac, and e1000_mac_info::ops.
00312 { 00313 if (hw->mac.ops.clear_vfta) 00314 hw->mac.ops.clear_vfta(hw); 00315 }
e1000_write_vfta - Write value to VLAN filter table : pointer to the HW structure : the 32-bit offset in which to write the value to.
: the 32-bit value to write at location offset.
This writes a 32-bit value to a 32-bit offset in the VLAN filter table. This is a function pointer entry point called by drivers.
Definition at line 326 of file e1000_api.c.
References e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::write_vfta.
00327 { 00328 if (hw->mac.ops.write_vfta) 00329 hw->mac.ops.write_vfta(hw, offset, value); 00330 }
e1000_update_mc_addr_list - Update Multicast addresses : pointer to the HW structure : array of multicast addresses to program : number of multicast addresses to program
Updates the Multicast Table Array. The caller must have a packed mc_addr_list of multicast addresses.
Definition at line 341 of file e1000_api.c.
References e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::update_mc_addr_list.
00343 { 00344 if (hw->mac.ops.update_mc_addr_list) 00345 hw->mac.ops.update_mc_addr_list(hw, mc_addr_list, 00346 mc_addr_count); 00347 }
e1000_force_mac_fc - Force MAC flow control : pointer to the HW structure
Force the MAC's flow control settings. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 357 of file e1000_api.c.
References e1000_force_mac_fc_generic().
00358 { 00359 return e1000_force_mac_fc_generic(hw); 00360 }
e1000_check_for_link - Check/Store link connection : pointer to the HW structure
This checks the link condition of the adapter and stores the results in the hw->mac structure. This is a function pointer entry point called by drivers.
Definition at line 370 of file e1000_api.c.
References e1000_mac_operations::check_for_link, E1000_ERR_CONFIG, e1000_hw::mac, and e1000_mac_info::ops.
00371 { 00372 if (hw->mac.ops.check_for_link) 00373 return hw->mac.ops.check_for_link(hw); 00374 00375 return -E1000_ERR_CONFIG; 00376 }
e1000_reset_hw - Reset hardware : pointer to the HW structure
This resets the hardware into a known state. This is a function pointer entry point called by drivers.
Definition at line 415 of file e1000_api.c.
References E1000_ERR_CONFIG, e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::reset_hw.
Referenced by e1000_close(), e1000_probe(), e1000_remove(), and e1000_reset().
00416 { 00417 if (hw->mac.ops.reset_hw) 00418 return hw->mac.ops.reset_hw(hw); 00419 00420 return -E1000_ERR_CONFIG; 00421 }
e1000_init_hw - Initialize hardware : pointer to the HW structure
This inits the hardware readying it for operation. This is a function pointer entry point called by drivers.
Definition at line 430 of file e1000_api.c.
References E1000_ERR_CONFIG, e1000_mac_operations::init_hw, e1000_hw::mac, and e1000_mac_info::ops.
Referenced by e1000_reset().
00431 { 00432 if (hw->mac.ops.init_hw) 00433 return hw->mac.ops.init_hw(hw); 00434 00435 return -E1000_ERR_CONFIG; 00436 }
e1000_setup_link - Configures link and flow control : pointer to the HW structure
This configures link and flow control settings for the adapter. This is a function pointer entry point called by drivers. While modules can also call this, they probably call their own version of this function.
Definition at line 446 of file e1000_api.c.
References E1000_ERR_CONFIG, e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::setup_link.
Referenced by e1000_power_up_phy().
00447 { 00448 if (hw->mac.ops.setup_link) 00449 return hw->mac.ops.setup_link(hw); 00450 00451 return -E1000_ERR_CONFIG; 00452 }
e1000_get_speed_and_duplex - Returns current speed and duplex : pointer to the HW structure : pointer to a 16-bit value to store the speed : pointer to a 16-bit value to store the duplex.
This returns the speed and duplex of the adapter in the two 'out' variables passed in. This is a function pointer entry point called by drivers.
Definition at line 464 of file e1000_api.c.
References E1000_ERR_CONFIG, e1000_mac_operations::get_link_up_info, e1000_hw::mac, and e1000_mac_info::ops.
00465 { 00466 if (hw->mac.ops.get_link_up_info) 00467 return hw->mac.ops.get_link_up_info(hw, speed, duplex); 00468 00469 return -E1000_ERR_CONFIG; 00470 }
e1000_setup_led - Configures SW controllable LED : pointer to the HW structure
This prepares the SW controllable LED for use and saves the current state of the LED so it can be later restored. This is a function pointer entry point called by drivers.
Definition at line 480 of file e1000_api.c.
References E1000_SUCCESS, e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::setup_led.
00481 { 00482 if (hw->mac.ops.setup_led) 00483 return hw->mac.ops.setup_led(hw); 00484 00485 return E1000_SUCCESS; 00486 }
e1000_cleanup_led - Restores SW controllable LED : pointer to the HW structure
This restores the SW controllable LED to the value saved off by e1000_setup_led. This is a function pointer entry point called by drivers.
Definition at line 495 of file e1000_api.c.
References e1000_mac_operations::cleanup_led, E1000_SUCCESS, e1000_hw::mac, and e1000_mac_info::ops.
00496 { 00497 if (hw->mac.ops.cleanup_led) 00498 return hw->mac.ops.cleanup_led(hw); 00499 00500 return E1000_SUCCESS; 00501 }
e1000_blink_led - Blink SW controllable LED : pointer to the HW structure
This starts the adapter LED blinking. Request the LED to be setup first and cleaned up after. This is a function pointer entry point called by drivers.
Definition at line 511 of file e1000_api.c.
References e1000_mac_operations::blink_led, E1000_SUCCESS, e1000_hw::mac, and e1000_mac_info::ops.
00512 { 00513 if (hw->mac.ops.blink_led) 00514 return hw->mac.ops.blink_led(hw); 00515 00516 return E1000_SUCCESS; 00517 }
e1000_id_led_init - store LED configurations in SW : pointer to the HW structure
Initializes the LED config in SW. This is a function pointer entry point called by drivers.
Definition at line 526 of file e1000_api.c.
References E1000_SUCCESS, e1000_mac_operations::id_led_init, e1000_hw::mac, and e1000_mac_info::ops.
00527 { 00528 if (hw->mac.ops.id_led_init) 00529 return hw->mac.ops.id_led_init(hw); 00530 00531 return E1000_SUCCESS; 00532 }
e1000_led_on - Turn on SW controllable LED : pointer to the HW structure
Turns the SW defined LED on. This is a function pointer entry point called by drivers.
Definition at line 541 of file e1000_api.c.
References E1000_SUCCESS, e1000_mac_operations::led_on, e1000_hw::mac, and e1000_mac_info::ops.
00542 { 00543 if (hw->mac.ops.led_on) 00544 return hw->mac.ops.led_on(hw); 00545 00546 return E1000_SUCCESS; 00547 }
e1000_led_off - Turn off SW controllable LED : pointer to the HW structure
Turns the SW defined LED off. This is a function pointer entry point called by drivers.
Definition at line 556 of file e1000_api.c.
References E1000_SUCCESS, e1000_mac_operations::led_off, e1000_hw::mac, and e1000_mac_info::ops.
00557 { 00558 if (hw->mac.ops.led_off) 00559 return hw->mac.ops.led_off(hw); 00560 00561 return E1000_SUCCESS; 00562 }
| void e1000_reset_adaptive | ( | struct e1000_hw * | hw | ) |
e1000_reset_adaptive - Reset adaptive IFS : pointer to the HW structure
Resets the adaptive IFS. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 571 of file e1000_api.c.
References e1000_reset_adaptive_generic().
Referenced by e1000_reset().
00572 { 00573 e1000_reset_adaptive_generic(hw); 00574 }
| void e1000_update_adaptive | ( | struct e1000_hw * | hw | ) |
e1000_update_adaptive - Update adaptive IFS : pointer to the HW structure
Updates adapter IFS. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 583 of file e1000_api.c.
References e1000_update_adaptive_generic().
00584 { 00585 e1000_update_adaptive_generic(hw); 00586 }
e1000_disable_pcie_master - Disable PCI-Express master access : pointer to the HW structure
Disables PCI-Express master access and verifies there are no pending requests. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 596 of file e1000_api.c.
References e1000_disable_pcie_master_generic().
00597 { 00598 return e1000_disable_pcie_master_generic(hw); 00599 }
| void e1000_config_collision_dist | ( | struct e1000_hw * | hw | ) |
e1000_config_collision_dist - Configure collision distance : pointer to the HW structure
Configures the collision distance to the default value and is used during link setup.
Definition at line 608 of file e1000_api.c.
References e1000_mac_operations::config_collision_dist, e1000_hw::mac, and e1000_mac_info::ops.
Referenced by e1000_configure_tx().
00609 { 00610 if (hw->mac.ops.config_collision_dist) 00611 hw->mac.ops.config_collision_dist(hw); 00612 }
e1000_rar_set - Sets a receive address register : pointer to the HW structure : address to set the RAR to : the RAR to set
Sets a Receive Address Register (RAR) to the specified address.
Definition at line 622 of file e1000_api.c.
References e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::rar_set.
e1000_validate_mdi_setting - Ensures valid MDI/MDIX SW state : pointer to the HW structure
Ensures that the MDI/MDIX SW state is valid.
Definition at line 634 of file e1000_api.c.
References E1000_SUCCESS, e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::validate_mdi_setting.
00635 { 00636 if (hw->mac.ops.validate_mdi_setting) 00637 return hw->mac.ops.validate_mdi_setting(hw); 00638 00639 return E1000_SUCCESS; 00640 }
e1000_mta_set - Sets multicast table bit : pointer to the HW structure : Multicast hash value.
This sets the bit in the multicast table corresponding to the hash value. This is a function pointer entry point called by drivers.
Definition at line 650 of file e1000_api.c.
References e1000_hw::mac, e1000_mac_operations::mta_set, and e1000_mac_info::ops.
e1000_hash_mc_addr - Determines address location in multicast table : pointer to the HW structure : Multicast address to hash.
This hashes an address to determine its location in the multicast table. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 665 of file e1000_api.c.
References e1000_hash_mc_addr_generic().
00666 { 00667 return e1000_hash_mc_addr_generic(hw, mc_addr); 00668 }
e1000_wait_autoneg - Waits for autonegotiation completion : pointer to the HW structure
Waits for autoneg to complete. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 749 of file e1000_api.c.
References E1000_SUCCESS, e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::wait_autoneg.
00750 { 00751 if (hw->mac.ops.wait_autoneg) 00752 return hw->mac.ops.wait_autoneg(hw); 00753 00754 return E1000_SUCCESS; 00755 }
e1000_check_reset_block - Verifies PHY can be reset : pointer to the HW structure
Checks if the PHY is in a state that can be reset or if manageability has it tied up. This is a function pointer entry point called by drivers.
Definition at line 764 of file e1000_api.c.
References e1000_phy_operations::check_reset_block, E1000_SUCCESS, e1000_phy_info::ops, and e1000_hw::phy.
Referenced by e1000_probe().
00765 { 00766 if (hw->phy.ops.check_reset_block) 00767 return hw->phy.ops.check_reset_block(hw); 00768 00769 return E1000_SUCCESS; 00770 }
e1000_read_phy_reg - Reads PHY register : pointer to the HW structure : the register to read : the buffer to store the 16-bit read.
Reads the PHY register and returns the value in data. This is a function pointer entry point called by drivers.
Definition at line 781 of file e1000_api.c.
References E1000_SUCCESS, e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::read_reg.
00782 { 00783 if (hw->phy.ops.read_reg) 00784 return hw->phy.ops.read_reg(hw, offset, data); 00785 00786 return E1000_SUCCESS; 00787 }
e1000_write_phy_reg - Writes PHY register : pointer to the HW structure : the register to write : the value to write.
Writes the PHY register at offset with the value in data. This is a function pointer entry point called by drivers.
Definition at line 798 of file e1000_api.c.
References E1000_SUCCESS, e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::write_reg.
00799 { 00800 if (hw->phy.ops.write_reg) 00801 return hw->phy.ops.write_reg(hw, offset, data); 00802 00803 return E1000_SUCCESS; 00804 }
| void e1000_release_phy | ( | struct e1000_hw * | hw | ) |
e1000_release_phy - Generic release PHY : pointer to the HW structure
Return if silicon family does not require a semaphore when accessing the PHY.
Definition at line 813 of file e1000_api.c.
References e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::release.
e1000_acquire_phy - Generic acquire PHY : pointer to the HW structure
Return success if silicon family does not require a semaphore when accessing the PHY.
Definition at line 826 of file e1000_api.c.
References e1000_phy_operations::acquire, E1000_SUCCESS, e1000_phy_info::ops, and e1000_hw::phy.
00827 { 00828 if (hw->phy.ops.acquire) 00829 return hw->phy.ops.acquire(hw); 00830 00831 return E1000_SUCCESS; 00832 }
e1000_read_kmrn_reg - Reads register using Kumeran interface : pointer to the HW structure : the register to read : the location to store the 16-bit value read.
Reads a register out of the Kumeran interface. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 844 of file e1000_api.c.
References e1000_read_kmrn_reg_generic().
00845 { 00846 return e1000_read_kmrn_reg_generic(hw, offset, data); 00847 }
e1000_write_kmrn_reg - Writes register using Kumeran interface : pointer to the HW structure : the register to write : the value to write.
Writes a register to the Kumeran interface. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 859 of file e1000_api.c.
References e1000_write_kmrn_reg_generic().
00860 { 00861 return e1000_write_kmrn_reg_generic(hw, offset, data); 00862 }
e1000_get_phy_info - Retrieves PHY information from registers : pointer to the HW structure
This function gets some information from various PHY registers and populates hw->phy values with it. This is a function pointer entry point called by drivers.
Definition at line 890 of file e1000_api.c.
References E1000_SUCCESS, e1000_phy_operations::get_info, e1000_phy_info::ops, and e1000_hw::phy.
Referenced by e1000_reset().
00891 { 00892 if (hw->phy.ops.get_info) 00893 return hw->phy.ops.get_info(hw); 00894 00895 return E1000_SUCCESS; 00896 }
e1000_phy_hw_reset - Hard PHY reset : pointer to the HW structure
Performs a hard PHY reset. This is a function pointer entry point called by drivers.
Definition at line 905 of file e1000_api.c.
References E1000_SUCCESS, e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::reset.
Referenced by e1000_probe().
00906 { 00907 if (hw->phy.ops.reset) 00908 return hw->phy.ops.reset(hw); 00909 00910 return E1000_SUCCESS; 00911 }
e1000_phy_commit - Soft PHY reset : pointer to the HW structure
Performs a soft PHY reset on those that apply. This is a function pointer entry point called by drivers.
Definition at line 920 of file e1000_api.c.
References e1000_phy_operations::commit, E1000_SUCCESS, e1000_phy_info::ops, and e1000_hw::phy.
00921 { 00922 if (hw->phy.ops.commit) 00923 return hw->phy.ops.commit(hw); 00924 00925 return E1000_SUCCESS; 00926 }
e1000_set_d0_lplu_state - Sets low power link up state for D0 : pointer to the HW structure : boolean used to enable/disable lplu
Success returns 0, Failure returns 1
The low power link up (lplu) state is set to the power management level D0 and SmartSpeed is disabled when active is true, else clear lplu for D0 and enable Smartspeed. LPLU and Smartspeed are mutually exclusive. LPLU is used during Dx states where the power conservation is most important. During driver activity, SmartSpeed should be enabled so performance is maintained. This is a function pointer entry point called by drivers.
Definition at line 942 of file e1000_api.c.
References E1000_SUCCESS, e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::set_d0_lplu_state.
00943 { 00944 if (hw->phy.ops.set_d0_lplu_state) 00945 return hw->phy.ops.set_d0_lplu_state(hw, active); 00946 00947 return E1000_SUCCESS; 00948 }
e1000_set_d3_lplu_state - Sets low power link up state for D3 : pointer to the HW structure : boolean used to enable/disable lplu
Success returns 0, Failure returns 1
The low power link up (lplu) state is set to the power management level D3 and SmartSpeed is disabled when active is true, else clear lplu for D3 and enable Smartspeed. LPLU and Smartspeed are mutually exclusive. LPLU is used during Dx states where the power conservation is most important. During driver activity, SmartSpeed should be enabled so performance is maintained. This is a function pointer entry point called by drivers.
Definition at line 964 of file e1000_api.c.
References E1000_SUCCESS, e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::set_d3_lplu_state.
00965 { 00966 if (hw->phy.ops.set_d3_lplu_state) 00967 return hw->phy.ops.set_d3_lplu_state(hw, active); 00968 00969 return E1000_SUCCESS; 00970 }
e1000_read_mac_addr - Reads MAC address : pointer to the HW structure
Reads the MAC address out of the adapter and stores it in the HW structure. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 980 of file e1000_api.c.
References e1000_read_mac_addr_generic(), e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::read_mac_addr.
Referenced by e1000_probe().
00981 { 00982 if (hw->mac.ops.read_mac_addr) 00983 return hw->mac.ops.read_mac_addr(hw); 00984 00985 return e1000_read_mac_addr_generic(hw); 00986 }
e1000_read_pba_num - Read device part number : pointer to the HW structure : pointer to device part number
Reads the product board assembly (PBA) number from the EEPROM and stores the value in pba_num. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 998 of file e1000_api.c.
References e1000_read_pba_num_generic().
00999 { 01000 return e1000_read_pba_num_generic(hw, pba_num); 01001 }
e1000_validate_nvm_checksum - Verifies NVM (EEPROM) checksum : pointer to the HW structure
Validates the NVM checksum is correct. This is a function pointer entry point called by drivers.
Definition at line 1010 of file e1000_api.c.
References E1000_ERR_CONFIG, e1000_hw::nvm, e1000_nvm_info::ops, and e1000_nvm_operations::validate.
Referenced by e1000_probe().
01011 { 01012 if (hw->nvm.ops.validate) 01013 return hw->nvm.ops.validate(hw); 01014 01015 return -E1000_ERR_CONFIG; 01016 }
e1000_update_nvm_checksum - Updates NVM (EEPROM) checksum : pointer to the HW structure
Updates the NVM checksum. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 1025 of file e1000_api.c.
References E1000_ERR_CONFIG, e1000_hw::nvm, e1000_nvm_info::ops, and e1000_nvm_operations::update.
01026 { 01027 if (hw->nvm.ops.update) 01028 return hw->nvm.ops.update(hw); 01029 01030 return -E1000_ERR_CONFIG; 01031 }
| void e1000_reload_nvm | ( | struct e1000_hw * | hw | ) |
e1000_reload_nvm - Reloads EEPROM : pointer to the HW structure
Reloads the EEPROM by setting the "Reinitialize from EEPROM" bit in the extended control register.
Definition at line 1040 of file e1000_api.c.
References e1000_hw::nvm, e1000_nvm_info::ops, and e1000_nvm_operations::reload.
e1000_read_nvm - Reads NVM (EEPROM) : pointer to the HW structure : the word offset to read : number of 16-bit words to read : pointer to the properly sized buffer for the data.
Reads 16-bit chunks of data from the NVM (EEPROM). This is a function pointer entry point called by drivers.
Definition at line 1056 of file e1000_api.c.
References E1000_ERR_CONFIG, e1000_hw::nvm, e1000_nvm_info::ops, and e1000_nvm_operations::read.
01057 { 01058 if (hw->nvm.ops.read) 01059 return hw->nvm.ops.read(hw, offset, words, data); 01060 01061 return -E1000_ERR_CONFIG; 01062 }
e1000_write_nvm - Writes to NVM (EEPROM) : pointer to the HW structure : the word offset to read : number of 16-bit words to write : pointer to the properly sized buffer for the data.
Writes 16-bit chunks of data to the NVM (EEPROM). This is a function pointer entry point called by drivers.
Definition at line 1074 of file e1000_api.c.
References E1000_SUCCESS, e1000_hw::nvm, e1000_nvm_info::ops, and e1000_nvm_operations::write.
01075 { 01076 if (hw->nvm.ops.write) 01077 return hw->nvm.ops.write(hw, offset, words, data); 01078 01079 return E1000_SUCCESS; 01080 }
| void e1000_power_up_phy | ( | struct e1000_hw * | hw | ) |
e1000_power_up_phy - Restores link in case of PHY power down : pointer to the HW structure
The phy may be powered down to save power, to turn off link when the driver is unloaded, or wake on lan is not enabled (among others).
Definition at line 1089 of file e1000_api.c.
References e1000_setup_link(), e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::power_up.
01090 { 01091 if (hw->phy.ops.power_up) 01092 hw->phy.ops.power_up(hw); 01093 01094 e1000_setup_link(hw); 01095 }
| void e1000_power_down_phy | ( | struct e1000_hw * | hw | ) |
e1000_power_down_phy - Power down PHY : pointer to the HW structure
The phy may be powered down to save power, to turn off link when the driver is unloaded, or wake on lan is not enabled (among others).
Definition at line 1104 of file e1000_api.c.
References e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::power_down.
01105 { 01106 if (hw->phy.ops.power_down) 01107 hw->phy.ops.power_down(hw); 01108 }
1.5.7.1