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

Go to the source code of this file.

Functions

s32 e1000_set_mac_type (struct e1000_hw *hw)
 
void e1000_set_media_type (struct e1000_hw *hw)
 
s32 e1000_reset_hw (struct e1000_hw *hw)
 
s32 e1000_init_hw (struct e1000_hw *hw)
 
s32 e1000_setup_link (struct e1000_hw *hw)
 
s32 e1000_phy_setup_autoneg (struct e1000_hw *hw)
 
void e1000_config_collision_dist (struct e1000_hw *hw)
 
s32 e1000_force_mac_fc (struct e1000_hw *hw)
 
s32 e1000_check_for_link (struct e1000_hw *hw)
 
s32 e1000_get_speed_and_duplex (struct e1000_hw *hw, u16 *speed, u16 *duplex)
 
s32 e1000_read_phy_reg (struct e1000_hw *hw, u32 reg_addr, u16 *phy_data)
 
s32 e1000_write_phy_reg (struct e1000_hw *hw, u32 reg_addr, u16 phy_data)
 
s32 e1000_phy_hw_reset (struct e1000_hw *hw)
 
s32 e1000_phy_reset (struct e1000_hw *hw)
 
s32 e1000_phy_get_info (struct e1000_hw *hw, struct e1000_phy_info *phy_info)
 
s32 e1000_validate_mdi_setting (struct e1000_hw *hw)
 
s32 e1000_init_eeprom_params (struct e1000_hw *hw)
 
s32 e1000_read_eeprom (struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 e1000_validate_eeprom_checksum (struct e1000_hw *hw)
 
s32 e1000_update_eeprom_checksum (struct e1000_hw *hw)
 
s32 e1000_write_eeprom (struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 e1000_read_mac_addr (struct e1000_hw *hw)
 
u32 e1000_hash_mc_addr (struct e1000_hw *hw, u8 *mc_addr)
 
void e1000_rar_set (struct e1000_hw *hw, u8 *addr, u32 index)
 
void e1000_write_vfta (struct e1000_hw *hw, u32 offset, u32 value)
 
s32 e1000_setup_led (struct e1000_hw *hw)
 
s32 e1000_cleanup_led (struct e1000_hw *hw)
 
s32 e1000_led_on (struct e1000_hw *hw)
 
s32 e1000_led_off (struct e1000_hw *hw)
 
void e1000_reset_adaptive (struct e1000_hw *hw)
 
void e1000_update_adaptive (struct e1000_hw *hw)
 
void e1000_tbi_adjust_stats (struct e1000_hw *hw, struct e1000_hw_stats *stats, u32 frame_len, u8 *mac_addr)
 
void e1000_get_bus_info (struct e1000_hw *hw)
 
u32 e1000_enable_mng_pass_thru (struct e1000_hw *hw)
 

Function Documentation

s32 e1000_check_for_link ( struct e1000_hw hw)

e1000_check_for_link : Struct containing variables accessed by shared code

Checks to see if the link status of the hardware has changed. Called by any function that needs to check the link status of the adapter.

Definition at line 2416 of file e1000_hw.c.

s32 e1000_cleanup_led ( struct e1000_hw hw)

e1000_cleanup_led - Restores the saved state of the SW controlable LED. : Struct containing variables accessed by shared code

Definition at line 4610 of file e1000_hw.c.

void e1000_config_collision_dist ( struct e1000_hw hw)

e1000_config_collision_dist - set collision distance register : Struct containing variables accessed by shared code

Sets the collision distance in the Transmit Control register. Link should have been established previously. Reads the speed and duplex information from the Device Status register.

Definition at line 1915 of file e1000_hw.c.

u32 e1000_enable_mng_pass_thru ( struct e1000_hw hw)

e1000_enable_mng_pass_thru - check for bmc pass through : Struct containing variables accessed by shared code

Verifies the hardware needs to allow ARPs to be processed by the host returns: - true/false

Definition at line 5690 of file e1000_hw.c.

s32 e1000_force_mac_fc ( struct e1000_hw hw)

e1000_force_mac_fc - force flow control settings : Struct containing variables accessed by shared code

Forces 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 2024 of file e1000_hw.c.

void e1000_get_bus_info ( struct e1000_hw hw)

e1000_get_bus_info : Struct containing variables accessed by shared code

Gets the current PCI bus type, speed, and width of the hardware

Definition at line 4966 of file e1000_hw.c.

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

e1000_get_speed_and_duplex : Struct containing variables accessed by shared code : Speed of the connection : Duplex setting of the connection

Detects the current speed and duplex settings of the hardware.

Definition at line 2597 of file e1000_hw.c.

u32 e1000_hash_mc_addr ( struct e1000_hw hw,
u8 mc_addr 
)

e1000_hash_mc_addr - Hashes an address to determine its location in the multicast table : Struct containing variables accessed by shared code : the multicast address to hash

Definition at line 4355 of file e1000_hw.c.

s32 e1000_init_eeprom_params ( struct e1000_hw hw)

e1000_init_eeprom_params - initialize sw eeprom vars : Struct containing variables accessed by shared code

Sets up eeprom variables in the hw struct. Must be called after mac_type is configured.

Definition at line 3495 of file e1000_hw.c.

s32 e1000_init_hw ( struct e1000_hw hw)

e1000_init_hw - Performs basic configuration of the adapter. : Struct containing variables accessed by shared code

Assumes that the controller has previously been reset and is in a post-reset uninitialized state. Initializes the receive address registers, multicast table, and VLAN filter table. Calls routines to setup link configuration and flow control settings. Clears all on-chip counters. Leaves the transmit and receive units disabled and uninitialized.

Definition at line 558 of file e1000_hw.c.

s32 e1000_led_off ( struct e1000_hw hw)

e1000_led_off - Turns off the software controllable LED : Struct containing variables accessed by shared code

Definition at line 4692 of file e1000_hw.c.

s32 e1000_led_on ( struct e1000_hw hw)

e1000_led_on - Turns on the software controllable LED : Struct containing variables accessed by shared code

Definition at line 4646 of file e1000_hw.c.

s32 e1000_phy_get_info ( struct e1000_hw hw,
struct e1000_phy_info phy_info 
)

e1000_phy_get_info - request phy info : Struct containing variables accessed by shared code : PHY information structure

Get PHY information from various PHY registers

Definition at line 3433 of file e1000_hw.c.

s32 e1000_phy_hw_reset ( struct e1000_hw hw)

e1000_phy_hw_reset - reset the phy, hardware style : Struct containing variables accessed by shared code

Returns the PHY to the power-on reset state

Definition at line 3080 of file e1000_hw.c.

s32 e1000_phy_reset ( struct e1000_hw hw)

e1000_phy_reset - reset the phy to commit settings : Struct containing variables accessed by shared code

Resets the PHY Sets bit 15 of the MII Control register

Definition at line 3139 of file e1000_hw.c.

s32 e1000_phy_setup_autoneg ( struct e1000_hw hw)

e1000_phy_setup_autoneg - phy settings : Struct containing variables accessed by shared code

Configures PHY autoneg and flow control advertisement settings

Definition at line 1535 of file e1000_hw.c.

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

e1000_rar_set - Puts an ethernet address into a receive address register. : Struct containing variables accessed by shared code : Address to put into receive address register : Receive address register to write

Definition at line 4395 of file e1000_hw.c.

s32 e1000_read_eeprom ( struct e1000_hw hw,
u16  offset,
u16  words,
u16 data 
)

e1000_read_eeprom - Reads a 16 bit word from the EEPROM. : Struct containing variables accessed by shared code : offset of word in the EEPROM to read : word read from the EEPROM : number of words to read

Definition at line 3908 of file e1000_hw.c.

s32 e1000_read_mac_addr ( struct e1000_hw hw)

e1000_read_mac_addr - read the adapters MAC from eeprom : Struct containing variables accessed by shared code

Reads the adapter's MAC address from the EEPROM and inverts the LSB for the second function of dual function devices

Definition at line 4286 of file e1000_hw.c.

s32 e1000_read_phy_reg ( struct e1000_hw hw,
u32  reg_addr,
u16 phy_data 
)

e1000_read_phy_reg - read a phy register : Struct containing variables accessed by shared code : address of the PHY register to read

Reads the value from a PHY register, if the value is on a specific non zero page, sets the page first.

Definition at line 2830 of file e1000_hw.c.

void e1000_reset_adaptive ( struct e1000_hw hw)

e1000_reset_adaptive - Resets Adaptive IFS to its default state. : Struct containing variables accessed by shared code

Call this after e1000_init_hw. You may override the IFS defaults by setting hw->ifs_params_forced to true. However, you must initialize hw-> current_ifs_val, ifs_min_val, ifs_max_val, ifs_step_size, and ifs_ratio before calling this function.

Definition at line 4823 of file e1000_hw.c.

s32 e1000_reset_hw ( struct e1000_hw hw)

e1000_reset_hw - reset the hardware completely : Struct containing variables accessed by shared code

Reset the transmit and receive units; mask and clear all interrupts.

Definition at line 407 of file e1000_hw.c.

s32 e1000_set_mac_type ( struct e1000_hw hw)

e1000_set_mac_type - Set the mac type member in the hw struct. : Struct containing variables accessed by shared code

Definition at line 252 of file e1000_hw.c.

void e1000_set_media_type ( struct e1000_hw hw)

e1000_set_media_type - Set media type and TBI compatibility. : Struct containing variables accessed by shared code

Definition at line 362 of file e1000_hw.c.

s32 e1000_setup_led ( struct e1000_hw hw)

e1000_setup_led : Struct containing variables accessed by shared code

Prepares SW controlable LED for use and saves the current state of the LED.

Definition at line 4557 of file e1000_hw.c.

s32 e1000_setup_link ( struct e1000_hw hw)

e1000_setup_link - Configures flow control and link settings. : Struct containing variables accessed by shared code

Determines which flow control settings to use. Calls the appropriate media- specific link configuration function. Configures the flow control settings. 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 720 of file e1000_hw.c.

void e1000_tbi_adjust_stats ( struct e1000_hw hw,
struct e1000_hw_stats stats,
u32  frame_len,
u8 mac_addr 
)

e1000_tbi_adjust_stats : Struct containing variables accessed by shared code : The length of the frame in question : The Ethernet destination address of the frame in question

Adjusts the statistic counters when a frame is accepted by TBI_ACCEPT

Definition at line 4890 of file e1000_hw.c.

void e1000_update_adaptive ( struct e1000_hw hw)

e1000_update_adaptive - update adaptive IFS : Struct containing variables accessed by shared code : Number of transmits since last callback : Number of collisions since last callback

Called during the callback/watchdog routine to update IFS value based on the ratio of transmits to collisions.

Definition at line 4851 of file e1000_hw.c.

s32 e1000_update_eeprom_checksum ( struct e1000_hw hw)

e1000_update_eeprom_checksum - Calculates/writes the EEPROM checksum : Struct containing variables accessed by shared code

Sums the first 63 16 bit words of the EEPROM. Subtracts the sum from 0xBABA. Writes the difference to word offset 63 of the EEPROM.

Definition at line 4050 of file e1000_hw.c.

s32 e1000_validate_eeprom_checksum ( struct e1000_hw hw)

e1000_validate_eeprom_checksum - Verifies that the EEPROM has a valid checksum : Struct containing variables accessed by shared code

Reads the first 64 16 bit words of the EEPROM and sums the values read. If the the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is valid.

Definition at line 4014 of file e1000_hw.c.

s32 e1000_validate_mdi_setting ( struct e1000_hw hw)

Definition at line 3476 of file e1000_hw.c.

s32 e1000_write_eeprom ( struct e1000_hw hw,
u16  offset,
u16  words,
u16 data 
)

e1000_write_eeprom - write words to the different EEPROM types. : Struct containing variables accessed by shared code : offset within the EEPROM to be written to : number of words to write : 16 bit word to be written to the EEPROM

If e1000_update_eeprom_checksum is not called after this function, the EEPROM will most likely contain an invalid checksum.

Definition at line 4082 of file e1000_hw.c.

s32 e1000_write_phy_reg ( struct e1000_hw hw,
u32  reg_addr,
u16  phy_data 
)

e1000_write_phy_reg - write a phy register

: Struct containing variables accessed by shared code : address of the PHY register to write : data to write to the PHY

Writes a value to a PHY register

Definition at line 2965 of file e1000_hw.c.

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

e1000_write_vfta - Writes a value to the specified offset in the VLAN filter table. : Struct containing variables accessed by shared code : Offset in VLAN filer table to write : Value to write into VLAN filter table

Definition at line 4443 of file e1000_hw.c.