Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
e1000_mac.h File Reference
#include "e1000_hw.h"
#include "e1000_phy.h"
#include "e1000_nvm.h"
#include "e1000_defines.h"

Go to the source code of this file.

Macros

#define E1000_FACTPS_MNGCG   0x20000000
 
#define E1000_FWSM_MODE_MASK   0xE
 
#define E1000_FWSM_MODE_SHIFT   1
 
#define E1000_MNG_DHCP_COOKIE_STATUS_VLAN   0x2
 

Enumerations

enum  e1000_mng_mode {
  e1000_mng_mode_none = 0, e1000_mng_mode_asf, e1000_mng_mode_pt, e1000_mng_mode_ipmi,
  e1000_mng_mode_host_interface_only, e1000_mng_mode_none = 0, e1000_mng_mode_asf, e1000_mng_mode_pt,
  e1000_mng_mode_ipmi, e1000_mng_mode_host_if_only, e1000_mng_mode_none = 0, e1000_mng_mode_asf,
  e1000_mng_mode_pt, e1000_mng_mode_ipmi, e1000_mng_mode_host_if_only
}
 

Functions

s32 igb_blink_led (struct e1000_hw *hw)
 
s32 igb_check_for_copper_link (struct e1000_hw *hw)
 
s32 igb_cleanup_led (struct e1000_hw *hw)
 
s32 igb_config_fc_after_link_up (struct e1000_hw *hw)
 
s32 igb_disable_pcie_master (struct e1000_hw *hw)
 
s32 igb_force_mac_fc (struct e1000_hw *hw)
 
s32 igb_get_auto_rd_done (struct e1000_hw *hw)
 
s32 igb_get_bus_info_pcie (struct e1000_hw *hw)
 
s32 igb_get_hw_semaphore (struct e1000_hw *hw)
 
s32 igb_get_speed_and_duplex_copper (struct e1000_hw *hw, u16 *speed, u16 *duplex)
 
s32 igb_id_led_init (struct e1000_hw *hw)
 
s32 igb_led_off (struct e1000_hw *hw)
 
void igb_update_mc_addr_list (struct e1000_hw *hw, u8 *mc_addr_list, u32 mc_addr_count)
 
s32 igb_setup_link (struct e1000_hw *hw)
 
s32 igb_validate_mdi_setting (struct e1000_hw *hw)
 
s32 igb_write_8bit_ctrl_reg (struct e1000_hw *hw, u32 reg, u32 offset, u8 data)
 
void igb_clear_hw_cntrs_base (struct e1000_hw *hw)
 
void igb_clear_vfta (struct e1000_hw *hw)
 
void igb_clear_vfta_i350 (struct e1000_hw *hw)
 
s32 igb_vfta_set (struct e1000_hw *hw, u32 vid, bool add)
 
void igb_config_collision_dist (struct e1000_hw *hw)
 
void igb_init_rx_addrs (struct e1000_hw *hw, u16 rar_count)
 
void igb_mta_set (struct e1000_hw *hw, u32 hash_value)
 
void igb_put_hw_semaphore (struct e1000_hw *hw)
 
void igb_rar_set (struct e1000_hw *hw, u8 *addr, u32 index)
 
s32 igb_check_alt_mac_addr (struct e1000_hw *hw)
 
bool igb_enable_mng_pass_thru (struct e1000_hw *hw)
 
void e1000_init_function_pointers_82575 (struct e1000_hw *hw)
 

Macro Definition Documentation

#define E1000_FACTPS_MNGCG   0x20000000

Definition at line 82 of file e1000_mac.h.

#define E1000_FWSM_MODE_MASK   0xE

Definition at line 84 of file e1000_mac.h.

#define E1000_FWSM_MODE_SHIFT   1

Definition at line 85 of file e1000_mac.h.

#define E1000_MNG_DHCP_COOKIE_STATUS_VLAN   0x2

Definition at line 87 of file e1000_mac.h.

Enumeration Type Documentation

Enumerator:
e1000_mng_mode_none 
e1000_mng_mode_asf 
e1000_mng_mode_pt 
e1000_mng_mode_ipmi 
e1000_mng_mode_host_interface_only 
e1000_mng_mode_none 
e1000_mng_mode_asf 
e1000_mng_mode_pt 
e1000_mng_mode_ipmi 
e1000_mng_mode_host_if_only 
e1000_mng_mode_none 
e1000_mng_mode_asf 
e1000_mng_mode_pt 
e1000_mng_mode_ipmi 
e1000_mng_mode_host_if_only 

Definition at line 74 of file e1000_mac.h.

Function Documentation

void e1000_init_function_pointers_82575 ( struct e1000_hw hw)
s32 igb_blink_led ( struct e1000_hw hw)

igb_blink_led - Blink LED : pointer to the HW structure

Blink the led's which are set to be on.

Definition at line 1301 of file e1000_mac.c.

s32 igb_check_alt_mac_addr ( struct e1000_hw hw)

igb_check_alt_mac_addr - Check for alternate MAC addr : pointer to the HW structure

Checks the nvm for an alternate MAC address. An alternate MAC address can be setup by pre-boot software and must be treated like a permanent address and must override the actual permanent MAC address. If an alternate MAC address is fopund it is saved in the hw struct and prgrammed into RAR0 and the cuntion returns success, otherwise the function returns an error.

Definition at line 237 of file e1000_mac.c.

s32 igb_check_for_copper_link ( struct e1000_hw hw)

igb_check_for_copper_link - Check for link (Copper) : pointer to the HW structure

Checks to see of the link status of the hardware has changed. If a change in link status has been detected, then we read the PHY registers to get the current speed/duplex if link exists.

Definition at line 533 of file e1000_mac.c.

s32 igb_cleanup_led ( struct e1000_hw hw)

igb_cleanup_led - Set LED config to default operation : pointer to the HW structure

Remove the current LED configuration and set the LED configuration to the default value, saved from the EEPROM.

Definition at line 1289 of file e1000_mac.c.

void igb_clear_hw_cntrs_base ( struct e1000_hw hw)

igb_clear_hw_cntrs_base - Clear base hardware counters : pointer to the HW structure

Clears the base hardware counters by reading the counter registers.

Definition at line 484 of file e1000_mac.c.

void igb_clear_vfta ( struct e1000_hw hw)

igb_clear_vfta - Clear VLAN filter table : pointer to the HW structure

Clears the register array which contains the VLAN filter table by setting all the values to 0.

Definition at line 95 of file e1000_mac.c.

void igb_clear_vfta_i350 ( struct e1000_hw hw)

igb_clear_vfta_i350 - Clear VLAN filter table : pointer to the HW structure

Clears the register array which contains the VLAN filter table by setting all the values to 0.

Definition at line 132 of file e1000_mac.c.

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. Currently no func pointer exists and all implementations are handled in the generic version of this function.

Definition at line 673 of file e1000_mac.c.

s32 igb_config_fc_after_link_up ( struct e1000_hw hw)

igb_config_fc_after_link_up - Configures flow control after link : pointer to the HW structure

Checks the status of auto-negotiation after link up to ensure that the speed and duplex were not forced. If the link needed to be forced, then flow control needs to be forced also. If auto-negotiation is enabled and did not fail, then we configure flow control based on our link partner.

Definition at line 838 of file e1000_mac.c.

s32 igb_disable_pcie_master ( struct e1000_hw hw)

igb_disable_pcie_master - Disables PCI-express master access : pointer to the HW structure

Returns 0 (0) if successful, else returns -10 (-E1000_ERR_MASTER_REQUESTS_PENDING) if master disable bit has not casued the master requests to be disabled.

Disables PCI-Express master access and verifies there are no pending requests.

Definition at line 1352 of file e1000_mac.c.

bool igb_enable_mng_pass_thru ( struct e1000_hw hw)

igb_enable_mng_pass_thru - Enable processing of ARP's : pointer to the HW structure

Verifies the hardware needs to leave interface enabled so that frames can be directed to and from the management interface.

Definition at line 1450 of file e1000_mac.c.

s32 igb_force_mac_fc ( struct e1000_hw hw)

igb_force_mac_fc - Force the MAC's flow control settings : pointer to the HW structure

Force the MAC's flow control settings. Sets the TFCE and RFCE bits in the device control register to reflect the adapter settings. TFCE and RFCE need to be explicitly set by software when a copper PHY is used because autonegotiation is managed by the PHY rather than the MAC. Software must also configure these bits when link is forced on a fiber connection.

Definition at line 774 of file e1000_mac.c.

s32 igb_get_auto_rd_done ( struct e1000_hw hw)

igb_get_auto_rd_done - Check for auto read completion : pointer to the HW structure

Check EEPROM for Auto Read done bit.

Definition at line 1161 of file e1000_mac.c.

s32 igb_get_bus_info_pcie ( struct e1000_hw hw)

igb_get_bus_info_pcie - Get PCIe bus information : pointer to the HW structure

Determines and stores the system bus information for a particular network interface. The following bus information is determined and stored: bus speed, bus width, type (PCIe), and PCIe function.

Definition at line 49 of file e1000_mac.c.

s32 igb_get_hw_semaphore ( struct e1000_hw hw)

igb_get_hw_semaphore - Acquire hardware semaphore : pointer to the HW structure

Acquire the HW semaphore to access the PHY or NVM

Definition at line 1091 of file e1000_mac.c.

s32 igb_get_speed_and_duplex_copper ( struct e1000_hw hw,
u16 speed,
u16 duplex 
)

igb_get_speed_and_duplex_copper - Retrieve current speed/duplex : pointer to the HW structure : stores the current speed : stores the current duplex

Read the status register for the current speed/duplex and store the current speed and duplex for copper connections.

Definition at line 1057 of file e1000_mac.c.

s32 igb_id_led_init ( struct e1000_hw hw)

igb_id_led_init - : pointer to the HW structure

Definition at line 1222 of file e1000_mac.c.

void igb_init_rx_addrs ( struct e1000_hw hw,
u16  rar_count 
)

igb_init_rx_addrs - Initialize receive address's : pointer to the HW structure : receive address registers

Setups the receive address registers by setting the base receive address register to the devices MAC address and clearing all the other receive address registers to 0.

Definition at line 173 of file e1000_mac.c.

s32 igb_led_off ( struct e1000_hw hw)

igb_led_off - Turn LED off : pointer to the HW structure

Turn LED off.

Definition at line 1328 of file e1000_mac.c.

void igb_mta_set ( struct e1000_hw hw,
u32  hash_value 
)

igb_mta_set - Set multicast filter table address : pointer to the HW structure : determines the MTA register and bit to set

The multicast table address is a register array of 32-bit registers. The hash_value is used to determine what register the bit is in, the current value is read, the new bit is OR'd in and the new value is written back into the register.

Definition at line 347 of file e1000_mac.c.

void igb_put_hw_semaphore ( struct e1000_hw hw)

igb_put_hw_semaphore - Release hardware semaphore : pointer to the HW structure

Release hardware semaphore used to access the PHY or NVM

Definition at line 1144 of file e1000_mac.c.

void igb_rar_set ( struct e1000_hw hw,
u8 addr,
u32  index 
)

igb_rar_set - Set receive address register : pointer to the HW structure : pointer to the receive address : receive address array register

Sets the receive address array register at index to the address passed in by addr.

Definition at line 308 of file e1000_mac.c.

s32 igb_setup_link ( struct e1000_hw hw)

igb_setup_link - Setup flow control and link settings : pointer to the HW structure

Determines which flow control settings to use, then configures flow control. Calls the appropriate media-specific link configuration function. Assuming the adapter has a valid link partner, a valid link should be established. Assumes the hardware has previously been reset and the transmitter and receiver are not enabled.

Definition at line 610 of file e1000_mac.c.

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

Updates entire Multicast Table Array. The caller must have a packed mc_addr_list of multicast addresses.

Definition at line 452 of file e1000_mac.c.

s32 igb_validate_mdi_setting ( struct e1000_hw hw)

igb_validate_mdi_setting - Verify MDI/MDIx settings : pointer to the HW structure

Verify that when not using auto-negotitation that MDI/MDIx is correctly set, which is forced to MDI mode only.

Definition at line 1390 of file e1000_mac.c.

s32 igb_vfta_set ( struct e1000_hw hw,
u32  vid,
bool  add 
)

igb_vfta_set - enable or disable vlan in VLAN filter table : pointer to the HW structure : VLAN id to add or remove : if true add filter, if false remove

Sets or clears a bit in the VLAN filter table array based on VLAN id and if we are adding or removing the filter

Definition at line 198 of file e1000_mac.c.

s32 igb_write_8bit_ctrl_reg ( struct e1000_hw hw,
u32  reg,
u32  offset,
u8  data 
)

igb_write_8bit_ctrl_reg - Write a 8bit CTRL register : pointer to the HW structure : 32bit register offset such as E1000_SCTL : register offset to write to : data to write at register offset

Writes an address/data control type register. There are several of these and they all have the format address << 8 | data and bit 31 is polled for completion.

Definition at line 1416 of file e1000_mac.c.