Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
mac.c File Reference
#include "e1000.h"

Go to the source code of this file.

Functions

s32 e1000e_get_bus_info_pcie (struct e1000_hw *hw)
 
void e1000_set_lan_id_multi_port_pcie (struct e1000_hw *hw)
 
void e1000_set_lan_id_single_port (struct e1000_hw *hw)
 
void e1000_clear_vfta_generic (struct e1000_hw *hw)
 
void e1000_write_vfta_generic (struct e1000_hw *hw, u32 offset, u32 value)
 
void e1000e_init_rx_addrs (struct e1000_hw *hw, u16 rar_count)
 
s32 e1000_check_alt_mac_addr_generic (struct e1000_hw *hw)
 
void e1000e_rar_set_generic (struct e1000_hw *hw, u8 *addr, u32 index)
 
void e1000e_update_mc_addr_list_generic (struct e1000_hw *hw, u8 *mc_addr_list, u32 mc_addr_count)
 
void e1000e_clear_hw_cntrs_base (struct e1000_hw *hw)
 
s32 e1000e_check_for_copper_link (struct e1000_hw *hw)
 
s32 e1000e_check_for_fiber_link (struct e1000_hw *hw)
 
s32 e1000e_check_for_serdes_link (struct e1000_hw *hw)
 
s32 e1000e_setup_link_generic (struct e1000_hw *hw)
 
s32 e1000e_setup_fiber_serdes_link (struct e1000_hw *hw)
 
void e1000e_config_collision_dist_generic (struct e1000_hw *hw)
 
s32 e1000e_set_fc_watermarks (struct e1000_hw *hw)
 
s32 e1000e_force_mac_fc (struct e1000_hw *hw)
 
s32 e1000e_config_fc_after_link_up (struct e1000_hw *hw)
 
s32 e1000e_get_speed_and_duplex_copper (struct e1000_hw *hw, u16 *speed, u16 *duplex)
 
s32 e1000e_get_speed_and_duplex_fiber_serdes (struct e1000_hw *hw, u16 *speed, u16 *duplex)
 
s32 e1000e_get_hw_semaphore (struct e1000_hw *hw)
 
void e1000e_put_hw_semaphore (struct e1000_hw *hw)
 
s32 e1000e_get_auto_rd_done (struct e1000_hw *hw)
 
s32 e1000e_valid_led_default (struct e1000_hw *hw, u16 *data)
 
s32 e1000e_id_led_init_generic (struct e1000_hw *hw)
 
s32 e1000e_setup_led_generic (struct e1000_hw *hw)
 
s32 e1000e_cleanup_led_generic (struct e1000_hw *hw)
 
s32 e1000e_blink_led_generic (struct e1000_hw *hw)
 
s32 e1000e_led_on_generic (struct e1000_hw *hw)
 
s32 e1000e_led_off_generic (struct e1000_hw *hw)
 
void e1000e_set_pcie_no_snoop (struct e1000_hw *hw, u32 no_snoop)
 
s32 e1000e_disable_pcie_master (struct e1000_hw *hw)
 
void e1000e_reset_adaptive (struct e1000_hw *hw)
 
void e1000e_update_adaptive (struct e1000_hw *hw)
 

Function Documentation

s32 e1000_check_alt_mac_addr_generic ( struct e1000_hw hw)

e1000_check_alt_mac_addr_generic - 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 found it is programmed into RAR0, replacing the permanent address that was installed into RAR0 by the Si on reset. This function will return SUCCESS unless it encounters an error while reading the EEPROM.

Definition at line 166 of file mac.c.

void e1000_clear_vfta_generic ( struct e1000_hw hw)

e1000_clear_vfta_generic - 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 104 of file mac.c.

void e1000_set_lan_id_multi_port_pcie ( struct e1000_hw hw)

e1000_set_lan_id_multi_port_pcie - Set LAN id for PCIe multiple port devices

: pointer to the HW structure

Determines the LAN function id by reading memory-mapped registers and swaps the port value if requested.

Definition at line 71 of file mac.c.

void e1000_set_lan_id_single_port ( struct e1000_hw hw)

e1000_set_lan_id_single_port - Set LAN id for a single port device : pointer to the HW structure

Sets the LAN function id to zero for a single port device.

Definition at line 90 of file mac.c.

void e1000_write_vfta_generic ( struct e1000_hw hw,
u32  offset,
u32  value 
)

e1000_write_vfta_generic - Write value to VLAN filter table : pointer to the HW structure : register offset in VLAN filter table : register value written to VLAN filter table

Writes value at the given offset in the register array which stores the VLAN filter table.

Definition at line 123 of file mac.c.

s32 e1000e_blink_led_generic ( struct e1000_hw hw)

e1000e_blink_led_generic - Blink LED : pointer to the HW structure

Blink the LEDs which are set to be on.

Definition at line 1513 of file mac.c.

s32 e1000e_check_for_copper_link ( struct e1000_hw hw)

e1000e_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 420 of file mac.c.

s32 e1000e_check_for_fiber_link ( struct e1000_hw hw)

e1000e_check_for_fiber_link - Check for link (Fiber) : pointer to the HW structure

Checks for link up on the hardware. If link is not up and we have a signal, then we need to force link up.

Definition at line 489 of file mac.c.

s32 e1000e_check_for_serdes_link ( struct e1000_hw hw)

e1000e_check_for_serdes_link - Check for link (Serdes) : pointer to the HW structure

Checks for link up on the hardware. If link is not up and we have a signal, then we need to force link up.

Definition at line 556 of file mac.c.

s32 e1000e_cleanup_led_generic ( struct e1000_hw hw)

e1000e_cleanup_led_generic - 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 1501 of file mac.c.

void e1000e_clear_hw_cntrs_base ( struct e1000_hw hw)

e1000e_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 371 of file mac.c.

void e1000e_config_collision_dist_generic ( struct e1000_hw hw)

e1000e_config_collision_dist_generic - 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 932 of file mac.c.

s32 e1000e_config_fc_after_link_up ( struct e1000_hw hw)

e1000e_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 1053 of file mac.c.

s32 e1000e_disable_pcie_master ( struct e1000_hw hw)

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

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

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

Definition at line 1624 of file mac.c.

s32 e1000e_force_mac_fc ( struct e1000_hw hw)

e1000e_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 992 of file mac.c.

s32 e1000e_get_auto_rd_done ( struct e1000_hw hw)

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

Check EEPROM for Auto Read done bit.

Definition at line 1357 of file mac.c.

s32 e1000e_get_bus_info_pcie ( struct e1000_hw hw)

e1000e_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 39 of file mac.c.

s32 e1000e_get_hw_semaphore ( struct e1000_hw hw)

e1000e_get_hw_semaphore - Acquire hardware semaphore : pointer to the HW structure

Acquire the HW semaphore to access the PHY or NVM

Definition at line 1293 of file mac.c.

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

e1000e_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 1244 of file mac.c.

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

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

Sets the speed and duplex to gigabit full duplex (the only possible option) for fiber/serdes links.

Definition at line 1278 of file mac.c.

s32 e1000e_id_led_init_generic ( struct e1000_hw hw)

e1000e_id_led_init_generic - : pointer to the HW structure

Definition at line 1405 of file mac.c.

void e1000e_init_rx_addrs ( struct e1000_hw hw,
u16  rar_count 
)

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

Setup 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 138 of file mac.c.

s32 e1000e_led_off_generic ( struct e1000_hw hw)

e1000e_led_off_generic - Turn LED off : pointer to the HW structure

Turn LED off.

Definition at line 1573 of file mac.c.

s32 e1000e_led_on_generic ( struct e1000_hw hw)

e1000e_led_on_generic - Turn LED on : pointer to the HW structure

Turn LED on.

Definition at line 1546 of file mac.c.

void e1000e_put_hw_semaphore ( struct e1000_hw hw)

e1000e_put_hw_semaphore - Release hardware semaphore : pointer to the HW structure

Release hardware semaphore used to access the PHY or NVM

Definition at line 1342 of file mac.c.

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

e1000e_rar_set_generic - 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 232 of file mac.c.

void e1000e_reset_adaptive ( struct e1000_hw hw)

e1000e_reset_adaptive - Reset Adaptive Interframe Spacing : pointer to the HW structure

Reset the Adaptive Interframe Spacing throttle to default values.

Definition at line 1654 of file mac.c.

s32 e1000e_set_fc_watermarks ( struct e1000_hw hw)

e1000e_set_fc_watermarks - Set flow control high/low watermarks : pointer to the HW structure

Sets the flow control high/low threshold (watermark) registers. If flow control XON frame transmission is enabled, then set XON frame transmission as well.

Definition at line 953 of file mac.c.

void e1000e_set_pcie_no_snoop ( struct e1000_hw hw,
u32  no_snoop 
)

e1000e_set_pcie_no_snoop - Set PCI-express capabilities : pointer to the HW structure : bitmap of snoop events

Set the PCI-express register to snoop for events enabled in 'no_snoop'.

Definition at line 1601 of file mac.c.

s32 e1000e_setup_fiber_serdes_link ( struct e1000_hw hw)

e1000e_setup_fiber_serdes_link - Setup link for fiber/serdes : pointer to the HW structure

Configures collision distance and flow control for fiber and serdes links. Upon successful setup, poll for link.

Definition at line 881 of file mac.c.

s32 e1000e_setup_led_generic ( struct e1000_hw hw)

e1000e_setup_led_generic - 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.

Definition at line 1471 of file mac.c.

s32 e1000e_setup_link_generic ( struct e1000_hw hw)

e1000e_setup_link_generic - 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 704 of file mac.c.

void e1000e_update_adaptive ( struct e1000_hw hw)

e1000e_update_adaptive - Update Adaptive Interframe Spacing : pointer to the HW structure

Update the Adaptive Interframe Spacing Throttle value based on the time between transmitted packets and time between collisions.

Definition at line 1680 of file mac.c.

void e1000e_update_mc_addr_list_generic ( struct e1000_hw hw,
u8 mc_addr_list,
u32  mc_addr_count 
)

e1000e_update_mc_addr_list_generic - 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 339 of file mac.c.

s32 e1000e_valid_led_default ( struct e1000_hw hw,
u16 data 
)

e1000e_valid_led_default - Verify a valid default LED config : pointer to the HW structure : pointer to the NVM (EEPROM)

Read the EEPROM for the current default LED configuration. If the LED configuration is not valid, set to a valid LED configuration.

Definition at line 1384 of file mac.c.