#include <stdint.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <unistd.h>#include <gpxe/io.h>#include <errno.h>#include <byteswap.h>#include <gpxe/pci.h>#include <gpxe/malloc.h>#include <gpxe/if_ether.h>#include <gpxe/ethernet.h>#include <gpxe/iobuf.h>#include <gpxe/netdevice.h>#include "igb_hw.h"Go to the source code of this file.
Defines | |
| #define | CARRIER_EXTENSION 0x0F |
| #define | TBI_ACCEPT(a, status, errors, length, last_byte, min_frame_size, max_frame_size) |
Functions | |
| FILE_LICENCE (GPL2_ONLY) | |
| void | igb_init_function_pointers_82575 (struct e1000_hw *hw) |
| igb_init_function_pointers_82575 - Init func ptrs. | |
| void | igb_rx_fifo_flush_82575 (struct e1000_hw *hw) |
| igb_rx_fifo_flush_82575 - Clean rx fifo after RX enable : pointer to the HW structure | |
| void | igb_init_function_pointers_vf (struct e1000_hw *hw) |
| void | igb_shutdown_fiber_serdes_link (struct e1000_hw *hw) |
| igb_shutdown_fiber_serdes_link - Remove link during power down : pointer to the HW structure | |
| s32 | igb_set_mac_type (struct e1000_hw *hw) |
| igb_set_mac_type - Sets MAC type : pointer to the HW structure | |
| s32 | igb_setup_init_funcs (struct e1000_hw *hw, bool init_device) |
| igb_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 | igb_init_mac_params (struct e1000_hw *hw) |
| igb_init_mac_params - Initialize MAC function pointers : pointer to the HW structure | |
| s32 | igb_init_nvm_params (struct e1000_hw *hw) |
| igb_init_nvm_params - Initialize NVM function pointers : pointer to the HW structure | |
| s32 | igb_init_phy_params (struct e1000_hw *hw) |
| igb_init_phy_params - Initialize PHY function pointers : pointer to the HW structure | |
| s32 | igb_init_mbx_params (struct e1000_hw *hw) |
| s32 | igb_get_bus_info (struct e1000_hw *hw) |
| igb_get_bus_info - Obtain bus information for adapter : pointer to the HW structure | |
| void | igb_clear_vfta (struct e1000_hw *hw) |
| igb_clear_vfta - Clear VLAN filter table : pointer to the HW structure | |
| void | igb_write_vfta (struct e1000_hw *hw, u32 offset, u32 value) |
| igb_write_vfta - Write value to VLAN filter table : pointer to the HW structure : the 32-bit offset in which to write the value to. | |
| s32 | igb_force_mac_fc (struct e1000_hw *hw) |
| igb_force_mac_fc - Force MAC flow control : pointer to the HW structure | |
| s32 | igb_check_for_link (struct e1000_hw *hw) |
| igb_check_for_link - Check/Store link connection : pointer to the HW structure | |
| s32 | igb_reset_hw (struct e1000_hw *hw) |
| igb_reset_hw - Reset hardware : pointer to the HW structure | |
| s32 | igb_init_hw (struct e1000_hw *hw) |
| igb_init_hw - Initialize hardware : pointer to the HW structure | |
| s32 | igb_setup_link (struct e1000_hw *hw) |
| igb_setup_link - Configures link and flow control : pointer to the HW structure | |
| s32 | igb_get_speed_and_duplex (struct e1000_hw *hw, u16 *speed, u16 *duplex) |
| igb_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 | igb_disable_pcie_master (struct e1000_hw *hw) |
| igb_disable_pcie_master - Disable PCI-Express master access : pointer to the HW structure | |
| void | igb_config_collision_dist (struct e1000_hw *hw) |
| igb_config_collision_dist - Configure collision distance : pointer to the HW structure | |
| void | igb_rar_set (struct e1000_hw *hw, u8 *addr, u32 index) |
| igb_rar_set - Sets a receive address register : pointer to the HW structure : address to set the RAR to : the RAR to set | |
| void | igb_mta_set (struct e1000_hw *hw, u32 hash_value) |
| igb_mta_set - Sets multicast table bit : pointer to the HW structure : Multicast hash value. | |
| u32 | igb_hash_mc_addr (struct e1000_hw *hw, u8 *mc_addr) |
| igb_hash_mc_addr - Determines address location in multicast table : pointer to the HW structure : Multicast address to hash. | |
| void | igb_update_mc_addr_list (struct e1000_hw *hw, u8 *mc_addr_list, u32 mc_addr_count) |
| igb_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 | igb_setup_led (struct e1000_hw *hw) |
| igb_setup_led - Configures SW controllable LED : pointer to the HW structure | |
| s32 | igb_cleanup_led (struct e1000_hw *hw) |
| igb_cleanup_led - Restores SW controllable LED : pointer to the HW structure | |
| s32 | igb_check_reset_block (struct e1000_hw *hw) |
| igb_check_reset_block - Verifies PHY can be reset : pointer to the HW structure | |
| s32 | igb_blink_led (struct e1000_hw *hw) |
| igb_blink_led - Blink SW controllable LED : pointer to the HW structure | |
| s32 | igb_led_on (struct e1000_hw *hw) |
| igb_led_on - Turn on SW controllable LED : pointer to the HW structure | |
| s32 | igb_led_off (struct e1000_hw *hw) |
| igb_led_off - Turn off SW controllable LED : pointer to the HW structure | |
| s32 | igb_id_led_init (struct e1000_hw *hw) |
| igb_id_led_init - store LED configurations in SW : pointer to the HW structure | |
| void | igb_reset_adaptive (struct e1000_hw *hw) |
| igb_reset_adaptive - Reset adaptive IFS : pointer to the HW structure | |
| void | igb_update_adaptive (struct e1000_hw *hw) |
| igb_update_adaptive - Update adaptive IFS : pointer to the HW structure | |
| s32 | igb_validate_mdi_setting (struct e1000_hw *hw) |
| igb_validate_mdi_setting - Ensures valid MDI/MDIX SW state : pointer to the HW structure | |
| s32 | igb_read_phy_reg (struct e1000_hw *hw, u32 offset, u16 *data) |
| igb_read_phy_reg - Reads PHY register : pointer to the HW structure : the register to read : the buffer to store the 16-bit read. | |
| s32 | igb_write_phy_reg (struct e1000_hw *hw, u32 offset, u16 data) |
| igb_write_phy_reg - Writes PHY register : pointer to the HW structure : the register to write : the value to write. | |
| s32 | igb_write_8bit_ctrl_reg (struct e1000_hw *hw, u32 reg, u32 offset, u8 data) |
| igb_write_8bit_ctrl_reg - Writes 8bit Control register : pointer to the HW structure : 32bit register offset : the register to write : the value to write. | |
| s32 | igb_get_phy_info (struct e1000_hw *hw) |
| igb_get_phy_info - Retrieves PHY information from registers : pointer to the HW structure | |
| void | igb_release_phy (struct e1000_hw *hw) |
| igb_release_phy - Generic release PHY : pointer to the HW structure | |
| s32 | igb_acquire_phy (struct e1000_hw *hw) |
| igb_acquire_phy - Generic acquire PHY : pointer to the HW structure | |
| s32 | igb_phy_hw_reset (struct e1000_hw *hw) |
| igb_phy_hw_reset - Hard PHY reset : pointer to the HW structure | |
| s32 | igb_phy_commit (struct e1000_hw *hw) |
| igb_phy_commit - Soft PHY reset : pointer to the HW structure | |
| void | igb_power_up_phy (struct e1000_hw *hw) |
| igb_power_up_phy - Restores link in case of PHY power down : pointer to the HW structure | |
| void | igb_power_down_phy (struct e1000_hw *hw) |
| igb_power_down_phy - Power down PHY : pointer to the HW structure | |
| s32 | igb_read_mac_addr (struct e1000_hw *hw) |
| igb_read_mac_addr - Reads MAC address : pointer to the HW structure | |
| s32 | igb_read_pba_num (struct e1000_hw *hw, u32 *part_num) |
| igb_read_pba_num - Read device part number : pointer to the HW structure : pointer to device part number | |
| void | igb_reload_nvm (struct e1000_hw *hw) |
| igb_reload_nvm - Reloads EEPROM : pointer to the HW structure | |
| s32 | igb_update_nvm_checksum (struct e1000_hw *hw) |
| igb_update_nvm_checksum - Updates NVM (EEPROM) checksum : pointer to the HW structure | |
| s32 | igb_validate_nvm_checksum (struct e1000_hw *hw) |
| igb_validate_nvm_checksum - Verifies NVM (EEPROM) checksum : pointer to the HW structure | |
| s32 | igb_read_nvm (struct e1000_hw *hw, u16 offset, u16 words, u16 *data) |
| igb_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 | igb_read_kmrn_reg (struct e1000_hw *hw, u32 offset, u16 *data) |
| igb_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 | igb_write_kmrn_reg (struct e1000_hw *hw, u32 offset, u16 data) |
| igb_write_kmrn_reg - Writes register using Kumeran interface : pointer to the HW structure : the register to write : the value to write. | |
| s32 | igb_write_nvm (struct e1000_hw *hw, u16 offset, u16 words, u16 *data) |
| igb_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. | |
| s32 | igb_wait_autoneg (struct e1000_hw *hw) |
| igb_wait_autoneg - Waits for autonegotiation completion : pointer to the HW structure | |
| s32 | igb_set_d3_lplu_state (struct e1000_hw *hw, bool active) |
| igb_set_d3_lplu_state - Sets low power link up state for D3 : pointer to the HW structure : boolean used to enable/disable lplu | |
| s32 | igb_set_d0_lplu_state (struct e1000_hw *hw, bool active) |
| igb_set_d0_lplu_state - Sets low power link up state for D0 : pointer to the HW structure : boolean used to enable/disable lplu | |
| bool | igb_check_mng_mode (struct e1000_hw *hw) |
| igb_check_mng_mode - Check management mode : pointer to the HW structure | |
| bool | igb_enable_tx_pkt_filtering (struct e1000_hw *hw) |
| s32 | igb_mng_enable_host_if (struct e1000_hw *hw) |
| igb_mng_enable_host_if - Checks host interface is enabled : pointer to the HW structure | |
| s32 | igb_mng_host_if_write (struct e1000_hw *hw, u8 *buffer, u16 length, u16 offset, u8 *sum) |
| igb_enable_tx_pkt_filtering - Enable packet filtering on TX : pointer to the HW structure | |
| s32 | igb_mng_write_cmd_header (struct e1000_hw *hw, struct e1000_host_mng_command_header *hdr) |
| igb_mng_write_cmd_header - Writes manageability command header : pointer to the HW structure : pointer to the host interface command header | |
| s32 | igb_mng_write_dhcp_info (struct e1000_hw *hw, u8 *buffer, u16 length) |
| #define TBI_ACCEPT | ( | a, | |||
| status, | |||||
| errors, | |||||
| length, | |||||
| last_byte, | |||||
| min_frame_size, | |||||
| max_frame_size | ) |
Value:
(e1000_tbi_sbp_enabled_82543(a) && \ (((errors) & E1000_RXD_ERR_FRAME_ERR_MASK) == E1000_RXD_ERR_CE) && \ ((last_byte) == CARRIER_EXTENSION) && \ (((status) & E1000_RXD_STAT_VP) ? \ (((length) > (min_frame_size - VLAN_TAG_SIZE)) && \ ((length) <= (max_frame_size + 1))) : \ (((length) > min_frame_size) && \ ((length) <= (max_frame_size + VLAN_TAG_SIZE + 1)))))
| FILE_LICENCE | ( | GPL2_ONLY | ) |
| void igb_init_function_pointers_82575 | ( | struct e1000_hw * | hw | ) |
igb_init_function_pointers_82575 - Init func ptrs.
: pointer to the HW structure
Called to initialize all function pointers and parameters.
Definition at line 326 of file igb_82575.c.
References DEBUGFUNC, igb_init_mac_params_82575(), igb_init_nvm_params_82575(), igb_init_phy_params_82575(), e1000_mbx_operations::init_params, e1000_phy_operations::init_params, e1000_nvm_operations::init_params, e1000_mac_operations::init_params, e1000_hw::mac, e1000_hw::mbx, e1000_hw::nvm, e1000_mbx_info::ops, e1000_phy_info::ops, e1000_nvm_info::ops, e1000_mac_info::ops, and e1000_hw::phy.
Referenced by igb_setup_init_funcs().
00327 { 00328 DEBUGFUNC("igb_init_function_pointers_82575"); 00329 00330 hw->mac.ops.init_params = igb_init_mac_params_82575; 00331 hw->nvm.ops.init_params = igb_init_nvm_params_82575; 00332 hw->phy.ops.init_params = igb_init_phy_params_82575; 00333 #if 0 00334 hw->mbx.ops.init_params = igb_init_mbx_params_pf; 00335 #endif 00336 }
| void igb_rx_fifo_flush_82575 | ( | struct e1000_hw * | hw | ) |
igb_rx_fifo_flush_82575 - Clean rx fifo after RX enable : pointer to the HW structure
After rx enable if managability is enabled then there is likely some bad data at the start of the fifo and possibly in the DMA fifo. This function clears the fifos and flushes any packets that came in as rx was being enabled.
Definition at line 1445 of file igb_82575.c.
References DEBUGFUNC, DEBUGOUT, e1000_82575, E1000_MANC, E1000_MANC_RCV_TCO_EN, E1000_MPC, E1000_RCTL, E1000_RCTL_EN, E1000_RCTL_LPE, E1000_RCTL_SBP, E1000_READ_REG, E1000_RFCTL, E1000_RFCTL_LEF, E1000_RLPML, E1000_RNBC, E1000_ROC, E1000_RXDCTL, E1000_RXDCTL_QUEUE_ENABLE, E1000_WRITE_FLUSH, E1000_WRITE_REG, e1000_hw::mac, msec_delay, e1000_mac_info::type, and u32.
01446 { 01447 u32 rctl, rlpml, rxdctl[4], rfctl, temp_rctl, rx_enabled; 01448 int i, ms_wait; 01449 01450 DEBUGFUNC("igb_rx_fifo_workaround_82575"); 01451 if (hw->mac.type != e1000_82575 || 01452 !(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN)) 01453 return; 01454 01455 /* Disable all RX queues */ 01456 for (i = 0; i < 4; i++) { 01457 rxdctl[i] = E1000_READ_REG(hw, E1000_RXDCTL(i)); 01458 E1000_WRITE_REG(hw, E1000_RXDCTL(i), 01459 rxdctl[i] & ~E1000_RXDCTL_QUEUE_ENABLE); 01460 } 01461 /* Poll all queues to verify they have shut down */ 01462 for (ms_wait = 0; ms_wait < 10; ms_wait++) { 01463 msec_delay(1); 01464 rx_enabled = 0; 01465 for (i = 0; i < 4; i++) 01466 rx_enabled |= E1000_READ_REG(hw, E1000_RXDCTL(i)); 01467 if (!(rx_enabled & E1000_RXDCTL_QUEUE_ENABLE)) 01468 break; 01469 } 01470 01471 if (ms_wait == 10) { 01472 DEBUGOUT("Queue disable timed out after 10ms\n"); 01473 } 01474 /* Clear RLPML, RCTL.SBP, RFCTL.LEF, and set RCTL.LPE so that all 01475 * incoming packets are rejected. Set enable and wait 2ms so that 01476 * any packet that was coming in as RCTL.EN was set is flushed 01477 */ 01478 rfctl = E1000_READ_REG(hw, E1000_RFCTL); 01479 E1000_WRITE_REG(hw, E1000_RFCTL, rfctl & ~E1000_RFCTL_LEF); 01480 01481 rlpml = E1000_READ_REG(hw, E1000_RLPML); 01482 E1000_WRITE_REG(hw, E1000_RLPML, 0); 01483 01484 rctl = E1000_READ_REG(hw, E1000_RCTL); 01485 temp_rctl = rctl & ~(E1000_RCTL_EN | E1000_RCTL_SBP); 01486 temp_rctl |= E1000_RCTL_LPE; 01487 01488 E1000_WRITE_REG(hw, E1000_RCTL, temp_rctl); 01489 E1000_WRITE_REG(hw, E1000_RCTL, temp_rctl | E1000_RCTL_EN); 01490 E1000_WRITE_FLUSH(hw); 01491 msec_delay(2); 01492 01493 /* Enable RX queues that were previously enabled and restore our 01494 * previous state 01495 */ 01496 for (i = 0; i < 4; i++) 01497 E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl[i]); 01498 E1000_WRITE_REG(hw, E1000_RCTL, rctl); 01499 E1000_WRITE_FLUSH(hw); 01500 01501 E1000_WRITE_REG(hw, E1000_RLPML, rlpml); 01502 E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); 01503 01504 /* Flush receive errors generated by workaround */ 01505 E1000_READ_REG(hw, E1000_ROC); 01506 E1000_READ_REG(hw, E1000_RNBC); 01507 E1000_READ_REG(hw, E1000_MPC); 01508 }
| void igb_init_function_pointers_vf | ( | struct e1000_hw * | hw | ) |
| void igb_shutdown_fiber_serdes_link | ( | struct e1000_hw * | hw | ) |
igb_shutdown_fiber_serdes_link - Remove link during power down : pointer to the HW structure
Shutdown the optics and PCS on driver unload.
Definition at line 1103 of file igb_api.c.
References e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::shutdown_serdes.
01104 { 01105 if (hw->mac.ops.shutdown_serdes) 01106 hw->mac.ops.shutdown_serdes(hw); 01107 }
igb_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 igb_setup_init_funcs()).
Definition at line 147 of file igb_api.c.
References DEBUGFUNC, e1000_hw::device_id, e1000_82575, e1000_82576, E1000_DEV_ID_82575EB_COPPER, E1000_DEV_ID_82575EB_FIBER_SERDES, E1000_DEV_ID_82575GB_QUAD_COPPER, E1000_DEV_ID_82576, E1000_DEV_ID_82576_FIBER, E1000_DEV_ID_82576_NS, E1000_DEV_ID_82576_NS_SERDES, E1000_DEV_ID_82576_QUAD_COPPER, E1000_DEV_ID_82576_SERDES, E1000_DEV_ID_82576_SERDES_QUAD, E1000_ERR_MAC_INIT, E1000_SUCCESS, e1000_hw::mac, and e1000_mac_info::type.
Referenced by igb_setup_init_funcs().
00148 { 00149 struct e1000_mac_info *mac = &hw->mac; 00150 s32 ret_val = E1000_SUCCESS; 00151 00152 DEBUGFUNC("igb_set_mac_type"); 00153 00154 switch (hw->device_id) { 00155 case E1000_DEV_ID_82575EB_COPPER: 00156 case E1000_DEV_ID_82575EB_FIBER_SERDES: 00157 case E1000_DEV_ID_82575GB_QUAD_COPPER: 00158 mac->type = e1000_82575; 00159 break; 00160 case E1000_DEV_ID_82576: 00161 case E1000_DEV_ID_82576_FIBER: 00162 case E1000_DEV_ID_82576_SERDES: 00163 case E1000_DEV_ID_82576_QUAD_COPPER: 00164 case E1000_DEV_ID_82576_NS: 00165 case E1000_DEV_ID_82576_NS_SERDES: 00166 case E1000_DEV_ID_82576_SERDES_QUAD: 00167 mac->type = e1000_82576; 00168 break; 00169 default: 00170 /* Should never have loaded on this device */ 00171 ret_val = -E1000_ERR_MAC_INIT; 00172 break; 00173 } 00174 00175 return ret_val; 00176 }
igb_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 190 of file igb_api.c.
References DEBUGOUT, e1000_82575, e1000_82576, E1000_ERR_CONFIG, e1000_hw::hw_addr, igb_init_function_pointers_82575(), igb_init_mac_ops_generic(), igb_init_mac_params(), igb_init_mbx_params(), igb_init_nvm_ops_generic(), igb_init_nvm_params(), igb_init_phy_params(), igb_set_mac_type(), e1000_hw::mac, and e1000_mac_info::type.
Referenced by igb_sw_init().
00191 { 00192 s32 ret_val; 00193 00194 /* Can't do much good without knowing the MAC type. */ 00195 ret_val = igb_set_mac_type(hw); 00196 if (ret_val) { 00197 DEBUGOUT("ERROR: MAC type could not be set properly.\n"); 00198 goto out; 00199 } 00200 00201 if (!hw->hw_addr) { 00202 DEBUGOUT("ERROR: Registers not mapped\n"); 00203 ret_val = -E1000_ERR_CONFIG; 00204 goto out; 00205 } 00206 00207 /* 00208 * Init function pointers to generic implementations. We do this first 00209 * allowing a driver module to override it afterward. 00210 */ 00211 igb_init_mac_ops_generic(hw); 00212 igb_init_nvm_ops_generic(hw); 00213 #if 0 00214 igb_init_mbx_ops_generic(hw); 00215 #endif 00216 /* 00217 * Set up the init function pointers. These are functions within the 00218 * adapter family file that sets up function pointers for the rest of 00219 * the functions in that family. 00220 */ 00221 switch (hw->mac.type) { 00222 case e1000_82575: 00223 case e1000_82576: 00224 igb_init_function_pointers_82575(hw); 00225 break; 00226 default: 00227 DEBUGOUT("Hardware not supported\n"); 00228 ret_val = -E1000_ERR_CONFIG; 00229 break; 00230 } 00231 00232 /* 00233 * Initialize the rest of the function pointers. These require some 00234 * register reads/writes in some cases. 00235 */ 00236 if (!(ret_val) && init_device) { 00237 ret_val = igb_init_mac_params(hw); 00238 if (ret_val) 00239 goto out; 00240 00241 ret_val = igb_init_nvm_params(hw); 00242 if (ret_val) 00243 goto out; 00244 00245 ret_val = igb_init_phy_params(hw); 00246 if (ret_val) 00247 goto out; 00248 #if 0 00249 ret_val = igb_init_mbx_params(hw); 00250 if (ret_val) 00251 goto out; 00252 #endif 00253 } 00254 00255 out: 00256 return ret_val; 00257 }
igb_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 39 of file igb_api.c.
References DEBUGOUT, E1000_ERR_CONFIG, E1000_SUCCESS, e1000_mac_operations::init_params, e1000_hw::mac, and e1000_mac_info::ops.
Referenced by igb_setup_init_funcs().
00040 { 00041 s32 ret_val = E1000_SUCCESS; 00042 00043 if (hw->mac.ops.init_params) { 00044 ret_val = hw->mac.ops.init_params(hw); 00045 if (ret_val) { 00046 DEBUGOUT("MAC Initialization Error\n"); 00047 goto out; 00048 } 00049 } else { 00050 DEBUGOUT("mac.init_mac_params was NULL\n"); 00051 ret_val = -E1000_ERR_CONFIG; 00052 } 00053 00054 out: 00055 return ret_val; 00056 }
igb_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 65 of file igb_api.c.
References DEBUGOUT, E1000_ERR_CONFIG, E1000_SUCCESS, e1000_nvm_operations::init_params, e1000_hw::nvm, and e1000_nvm_info::ops.
Referenced by igb_setup_init_funcs().
00066 { 00067 s32 ret_val = E1000_SUCCESS; 00068 00069 if (hw->nvm.ops.init_params) { 00070 ret_val = hw->nvm.ops.init_params(hw); 00071 if (ret_val) { 00072 DEBUGOUT("NVM Initialization Error\n"); 00073 goto out; 00074 } 00075 } else { 00076 DEBUGOUT("nvm.init_nvm_params was NULL\n"); 00077 ret_val = -E1000_ERR_CONFIG; 00078 } 00079 00080 out: 00081 return ret_val; 00082 }
igb_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 91 of file igb_api.c.
References DEBUGOUT, E1000_ERR_CONFIG, E1000_SUCCESS, e1000_phy_operations::init_params, e1000_phy_info::ops, and e1000_hw::phy.
Referenced by igb_setup_init_funcs().
00092 { 00093 s32 ret_val = E1000_SUCCESS; 00094 00095 if (hw->phy.ops.init_params) { 00096 ret_val = hw->phy.ops.init_params(hw); 00097 if (ret_val) { 00098 DEBUGOUT("PHY Initialization Error\n"); 00099 goto out; 00100 } 00101 } else { 00102 DEBUGOUT("phy.init_phy_params was NULL\n"); 00103 ret_val = -E1000_ERR_CONFIG; 00104 } 00105 00106 out: 00107 return ret_val; 00108 }
Referenced by igb_setup_init_funcs().
igb_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 267 of file igb_api.c.
References E1000_SUCCESS, e1000_mac_operations::get_bus_info, e1000_hw::mac, and e1000_mac_info::ops.
Referenced by igb_probe().
00268 { 00269 if (hw->mac.ops.get_bus_info) 00270 return hw->mac.ops.get_bus_info(hw); 00271 00272 return E1000_SUCCESS; 00273 }
| void igb_clear_vfta | ( | struct e1000_hw * | hw | ) |
igb_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 282 of file igb_api.c.
References e1000_mac_operations::clear_vfta, e1000_hw::mac, and e1000_mac_info::ops.
00283 { 00284 if (hw->mac.ops.clear_vfta) 00285 hw->mac.ops.clear_vfta(hw); 00286 }
igb_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 297 of file igb_api.c.
References e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::write_vfta.
00298 { 00299 if (hw->mac.ops.write_vfta) 00300 hw->mac.ops.write_vfta(hw, offset, value); 00301 }
igb_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 328 of file igb_api.c.
References igb_force_mac_fc_generic().
00329 { 00330 return igb_force_mac_fc_generic(hw); 00331 }
igb_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 341 of file igb_api.c.
References e1000_mac_operations::check_for_link, E1000_ERR_CONFIG, e1000_hw::mac, and e1000_mac_info::ops.
00342 { 00343 if (hw->mac.ops.check_for_link) 00344 return hw->mac.ops.check_for_link(hw); 00345 00346 return -E1000_ERR_CONFIG; 00347 }
igb_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 386 of file igb_api.c.
References E1000_ERR_CONFIG, e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::reset_hw.
Referenced by igb_probe(), and igb_reset().
00387 { 00388 if (hw->mac.ops.reset_hw) 00389 return hw->mac.ops.reset_hw(hw); 00390 00391 return -E1000_ERR_CONFIG; 00392 }
igb_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 401 of file igb_api.c.
References E1000_ERR_CONFIG, e1000_mac_operations::init_hw, e1000_hw::mac, and e1000_mac_info::ops.
Referenced by igb_reset().
00402 { 00403 if (hw->mac.ops.init_hw) 00404 return hw->mac.ops.init_hw(hw); 00405 00406 return -E1000_ERR_CONFIG; 00407 }
igb_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 417 of file igb_api.c.
References E1000_ERR_CONFIG, e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::setup_link.
Referenced by igb_power_up_phy().
00418 { 00419 if (hw->mac.ops.setup_link) 00420 return hw->mac.ops.setup_link(hw); 00421 00422 return -E1000_ERR_CONFIG; 00423 }
igb_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 435 of file igb_api.c.
References E1000_ERR_CONFIG, e1000_mac_operations::get_link_up_info, e1000_hw::mac, and e1000_mac_info::ops.
00436 { 00437 if (hw->mac.ops.get_link_up_info) 00438 return hw->mac.ops.get_link_up_info(hw, speed, duplex); 00439 00440 return -E1000_ERR_CONFIG; 00441 }
igb_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 567 of file igb_api.c.
References igb_disable_pcie_master_generic().
00568 { 00569 return igb_disable_pcie_master_generic(hw); 00570 }
| void igb_config_collision_dist | ( | struct e1000_hw * | hw | ) |
igb_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 579 of file igb_api.c.
References e1000_mac_operations::config_collision_dist, e1000_hw::mac, and e1000_mac_info::ops.
Referenced by igb_configure_tx().
00580 { 00581 if (hw->mac.ops.config_collision_dist) 00582 hw->mac.ops.config_collision_dist(hw); 00583 }
igb_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 593 of file igb_api.c.
References e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::rar_set.
igb_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 621 of file igb_api.c.
References e1000_hw::mac, e1000_mac_operations::mta_set, and e1000_mac_info::ops.
igb_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 636 of file igb_api.c.
References igb_hash_mc_addr_generic().
00637 { 00638 return igb_hash_mc_addr_generic(hw, mc_addr); 00639 }
igb_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 312 of file igb_api.c.
References e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::update_mc_addr_list.
00314 { 00315 if (hw->mac.ops.update_mc_addr_list) 00316 hw->mac.ops.update_mc_addr_list(hw, mc_addr_list, 00317 mc_addr_count); 00318 }
igb_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 451 of file igb_api.c.
References E1000_SUCCESS, e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::setup_led.
00452 { 00453 if (hw->mac.ops.setup_led) 00454 return hw->mac.ops.setup_led(hw); 00455 00456 return E1000_SUCCESS; 00457 }
igb_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 466 of file igb_api.c.
References e1000_mac_operations::cleanup_led, E1000_SUCCESS, e1000_hw::mac, and e1000_mac_info::ops.
00467 { 00468 if (hw->mac.ops.cleanup_led) 00469 return hw->mac.ops.cleanup_led(hw); 00470 00471 return E1000_SUCCESS; 00472 }
igb_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 735 of file igb_api.c.
References e1000_phy_operations::check_reset_block, E1000_SUCCESS, e1000_phy_info::ops, and e1000_hw::phy.
00736 { 00737 if (hw->phy.ops.check_reset_block) 00738 return hw->phy.ops.check_reset_block(hw); 00739 00740 return E1000_SUCCESS; 00741 }
igb_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 482 of file igb_api.c.
References e1000_mac_operations::blink_led, E1000_SUCCESS, e1000_hw::mac, and e1000_mac_info::ops.
00483 { 00484 if (hw->mac.ops.blink_led) 00485 return hw->mac.ops.blink_led(hw); 00486 00487 return E1000_SUCCESS; 00488 }
igb_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 512 of file igb_api.c.
References E1000_SUCCESS, e1000_mac_operations::led_on, e1000_hw::mac, and e1000_mac_info::ops.
00513 { 00514 if (hw->mac.ops.led_on) 00515 return hw->mac.ops.led_on(hw); 00516 00517 return E1000_SUCCESS; 00518 }
igb_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 527 of file igb_api.c.
References E1000_SUCCESS, e1000_mac_operations::led_off, e1000_hw::mac, and e1000_mac_info::ops.
00528 { 00529 if (hw->mac.ops.led_off) 00530 return hw->mac.ops.led_off(hw); 00531 00532 return E1000_SUCCESS; 00533 }
igb_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 497 of file igb_api.c.
References E1000_SUCCESS, e1000_mac_operations::id_led_init, e1000_hw::mac, and e1000_mac_info::ops.
00498 { 00499 if (hw->mac.ops.id_led_init) 00500 return hw->mac.ops.id_led_init(hw); 00501 00502 return E1000_SUCCESS; 00503 }
| void igb_reset_adaptive | ( | struct e1000_hw * | hw | ) |
igb_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 542 of file igb_api.c.
References igb_reset_adaptive_generic().
00543 { 00544 igb_reset_adaptive_generic(hw); 00545 }
| void igb_update_adaptive | ( | struct e1000_hw * | hw | ) |
igb_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 554 of file igb_api.c.
References igb_update_adaptive_generic().
00555 { 00556 igb_update_adaptive_generic(hw); 00557 }
igb_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 605 of file igb_api.c.
References E1000_SUCCESS, e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::validate_mdi_setting.
Referenced by igb_probe().
00606 { 00607 if (hw->mac.ops.validate_mdi_setting) 00608 return hw->mac.ops.validate_mdi_setting(hw); 00609 00610 return E1000_SUCCESS; 00611 }
igb_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 752 of file igb_api.c.
References E1000_SUCCESS, e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::read_reg.
00753 { 00754 if (hw->phy.ops.read_reg) 00755 return hw->phy.ops.read_reg(hw, offset, data); 00756 00757 return E1000_SUCCESS; 00758 }
igb_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 769 of file igb_api.c.
References E1000_SUCCESS, e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::write_reg.
00770 { 00771 if (hw->phy.ops.write_reg) 00772 return hw->phy.ops.write_reg(hw, offset, data); 00773 00774 return E1000_SUCCESS; 00775 }
igb_write_8bit_ctrl_reg - Writes 8bit Control register : pointer to the HW structure : 32bit register offset : 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 1063 of file igb_api.c.
References igb_write_8bit_ctrl_reg_generic().
01065 { 01066 return igb_write_8bit_ctrl_reg_generic(hw, reg, offset, data); 01067 }
igb_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 861 of file igb_api.c.
References E1000_SUCCESS, e1000_phy_operations::get_info, e1000_phy_info::ops, and e1000_hw::phy.
Referenced by igb_reset().
00862 { 00863 if (hw->phy.ops.get_info) 00864 return hw->phy.ops.get_info(hw); 00865 00866 return E1000_SUCCESS; 00867 }
| void igb_release_phy | ( | struct e1000_hw * | hw | ) |
igb_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 784 of file igb_api.c.
References e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::release.
igb_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 797 of file igb_api.c.
References e1000_phy_operations::acquire, E1000_SUCCESS, e1000_phy_info::ops, and e1000_hw::phy.
00798 { 00799 if (hw->phy.ops.acquire) 00800 return hw->phy.ops.acquire(hw); 00801 00802 return E1000_SUCCESS; 00803 }
igb_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 876 of file igb_api.c.
References E1000_SUCCESS, e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::reset.
00877 { 00878 if (hw->phy.ops.reset) 00879 return hw->phy.ops.reset(hw); 00880 00881 return E1000_SUCCESS; 00882 }
igb_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 891 of file igb_api.c.
References e1000_phy_operations::commit, E1000_SUCCESS, e1000_phy_info::ops, and e1000_hw::phy.
00892 { 00893 if (hw->phy.ops.commit) 00894 return hw->phy.ops.commit(hw); 00895 00896 return E1000_SUCCESS; 00897 }
| void igb_power_up_phy | ( | struct e1000_hw * | hw | ) |
igb_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 1076 of file igb_api.c.
References igb_setup_link(), e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::power_up.
01077 { 01078 if (hw->phy.ops.power_up) 01079 hw->phy.ops.power_up(hw); 01080 01081 igb_setup_link(hw); 01082 }
| void igb_power_down_phy | ( | struct e1000_hw * | hw | ) |
igb_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 1091 of file igb_api.c.
References e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::power_down.
01092 { 01093 if (hw->phy.ops.power_down) 01094 hw->phy.ops.power_down(hw); 01095 }
igb_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 951 of file igb_api.c.
References igb_read_mac_addr_generic(), e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::read_mac_addr.
Referenced by igb_probe().
00952 { 00953 if (hw->mac.ops.read_mac_addr) 00954 return hw->mac.ops.read_mac_addr(hw); 00955 00956 return igb_read_mac_addr_generic(hw); 00957 }
igb_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 969 of file igb_api.c.
References igb_read_pba_num_generic().
00970 { 00971 return igb_read_pba_num_generic(hw, pba_num); 00972 }
| void igb_reload_nvm | ( | struct e1000_hw * | hw | ) |
igb_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 1011 of file igb_api.c.
References e1000_hw::nvm, e1000_nvm_info::ops, and e1000_nvm_operations::reload.
igb_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 996 of file igb_api.c.
References E1000_ERR_CONFIG, e1000_hw::nvm, e1000_nvm_info::ops, and e1000_nvm_operations::update.
00997 { 00998 if (hw->nvm.ops.update) 00999 return hw->nvm.ops.update(hw); 01000 01001 return -E1000_ERR_CONFIG; 01002 }
igb_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 981 of file igb_api.c.
References E1000_ERR_CONFIG, e1000_hw::nvm, e1000_nvm_info::ops, and e1000_nvm_operations::validate.
Referenced by igb_probe().
00982 { 00983 if (hw->nvm.ops.validate) 00984 return hw->nvm.ops.validate(hw); 00985 00986 return -E1000_ERR_CONFIG; 00987 }
igb_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 1027 of file igb_api.c.
References E1000_ERR_CONFIG, e1000_hw::nvm, e1000_nvm_info::ops, and e1000_nvm_operations::read.
01028 { 01029 if (hw->nvm.ops.read) 01030 return hw->nvm.ops.read(hw, offset, words, data); 01031 01032 return -E1000_ERR_CONFIG; 01033 }
igb_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 815 of file igb_api.c.
References igb_read_kmrn_reg_generic().
00816 { 00817 return igb_read_kmrn_reg_generic(hw, offset, data); 00818 }
igb_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 830 of file igb_api.c.
References igb_write_kmrn_reg_generic().
00831 { 00832 return igb_write_kmrn_reg_generic(hw, offset, data); 00833 }
igb_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 1045 of file igb_api.c.
References E1000_SUCCESS, e1000_hw::nvm, e1000_nvm_info::ops, and e1000_nvm_operations::write.
01046 { 01047 if (hw->nvm.ops.write) 01048 return hw->nvm.ops.write(hw, offset, words, data); 01049 01050 return E1000_SUCCESS; 01051 }
igb_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 720 of file igb_api.c.
References E1000_SUCCESS, e1000_hw::mac, e1000_mac_info::ops, and e1000_mac_operations::wait_autoneg.
00721 { 00722 if (hw->mac.ops.wait_autoneg) 00723 return hw->mac.ops.wait_autoneg(hw); 00724 00725 return E1000_SUCCESS; 00726 }
igb_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 935 of file igb_api.c.
References E1000_SUCCESS, e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::set_d3_lplu_state.
00936 { 00937 if (hw->phy.ops.set_d3_lplu_state) 00938 return hw->phy.ops.set_d3_lplu_state(hw, active); 00939 00940 return E1000_SUCCESS; 00941 }
igb_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 913 of file igb_api.c.
References E1000_SUCCESS, e1000_phy_info::ops, e1000_hw::phy, and e1000_phy_operations::set_d0_lplu_state.
00914 { 00915 if (hw->phy.ops.set_d0_lplu_state) 00916 return hw->phy.ops.set_d0_lplu_state(hw, active); 00917 00918 return E1000_SUCCESS; 00919 }
igb_check_mng_mode - Check management mode : pointer to the HW structure
This checks if the adapter has manageability enabled. This is a function pointer entry point called by drivers.
Definition at line 356 of file igb_api.c.
References e1000_mac_operations::check_mng_mode, e1000_hw::mac, and e1000_mac_info::ops.
00357 { 00358 if (hw->mac.ops.check_mng_mode) 00359 return hw->mac.ops.check_mng_mode(hw); 00360 00361 return false; 00362 }
igb_mng_enable_host_if - Checks host interface is enabled : pointer to the HW structure
Returns E1000_success upon success, else E1000_ERR_HOST_INTERFACE_COMMAND
This function checks whether the HOST IF is enabled for command operation and also checks whether the previous command is completed. It busy waits in case of previous command is not completed.
Definition at line 705 of file igb_api.c.
References E1000_NOT_IMPLEMENTED, e1000_hw::mac, e1000_mac_operations::mng_enable_host_if, and e1000_mac_info::ops.
00706 { 00707 if (hw->mac.ops.mng_enable_host_if) 00708 return hw->mac.ops.mng_enable_host_if(hw); 00709 00710 return E1000_NOT_IMPLEMENTED; 00711 }
igb_enable_tx_pkt_filtering - Enable packet filtering on TX : pointer to the HW structure
Enables packet filtering on transmit packets if manageability is enabled and host interface is enabled. Currently no func pointer exists and all implementations are handled in the generic version of this function. igb_mng_host_if_write - Writes to the manageability host interface : pointer to the HW structure : pointer to the host interface buffer : size of the buffer : location in the buffer to write to : sum of the data (not checksum) This function writes the buffer content at the offset given on the host if. It also does alignment considerations to do the writes in most efficient way. Also fills up the sum of the buffer in *buffer parameter.
Definition at line 669 of file igb_api.c.
References E1000_NOT_IMPLEMENTED, e1000_hw::mac, e1000_mac_operations::mng_host_if_write, and e1000_mac_info::ops.
00671 { 00672 if (hw->mac.ops.mng_host_if_write) 00673 return hw->mac.ops.mng_host_if_write(hw, buffer, length, 00674 offset, sum); 00675 00676 return E1000_NOT_IMPLEMENTED; 00677 }
| s32 igb_mng_write_cmd_header | ( | struct e1000_hw * | hw, | |
| struct e1000_host_mng_command_header * | hdr | |||
| ) |
igb_mng_write_cmd_header - Writes manageability command header : pointer to the HW structure : pointer to the host interface command header
Writes the command header after does the checksum calculation.
Definition at line 686 of file igb_api.c.
References E1000_NOT_IMPLEMENTED, e1000_hw::mac, e1000_mac_operations::mng_write_cmd_header, and e1000_mac_info::ops.
00688 { 00689 if (hw->mac.ops.mng_write_cmd_header) 00690 return hw->mac.ops.mng_write_cmd_header(hw, hdr); 00691 00692 return E1000_NOT_IMPLEMENTED; 00693 }
1.5.7.1