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

Go to the source code of this file.

Macros

#define M88E1000_CABLE_LENGTH_TABLE_SIZE   ARRAY_SIZE(e1000_m88_cable_length_table)
 
#define IGP02E1000_CABLE_LENGTH_TABLE_SIZE   ARRAY_SIZE(e1000_igp_2_cable_length_table)
 
#define BM_PHY_REG_PAGE(offset)   ((u16)(((offset) >> PHY_PAGE_SHIFT) & 0xFFFF))
 
#define BM_PHY_REG_NUM(offset)
 
#define HV_INTC_FC_PAGE_START   768
 
#define I82578_ADDR_REG   29
 
#define I82577_ADDR_REG   16
 
#define I82577_CFG_REG   22
 
#define I82577_CFG_ASSERT_CRS_ON_TX   (1 << 15)
 
#define I82577_CFG_ENABLE_DOWNSHIFT   (3 << 10) /* auto downshift 100/10 */
 
#define I82577_CTRL_REG   23
 
#define I82577_PHY_CTRL_2   18
 
#define I82577_PHY_STATUS_2   26
 
#define I82577_PHY_DIAG_STATUS   31
 
#define I82577_PHY_STATUS2_REV_POLARITY   0x0400
 
#define I82577_PHY_STATUS2_MDIX   0x0800
 
#define I82577_PHY_STATUS2_SPEED_MASK   0x0300
 
#define I82577_PHY_STATUS2_SPEED_1000MBPS   0x0200
 
#define I82577_PHY_CTRL2_MANUAL_MDIX   0x0200
 
#define I82577_PHY_CTRL2_AUTO_MDI_MDIX   0x0400
 
#define I82577_PHY_CTRL2_MDIX_CFG_MASK   0x0600
 
#define I82577_DSTATUS_CABLE_LENGTH   0x03FC
 
#define I82577_DSTATUS_CABLE_LENGTH_SHIFT   2
 
#define BM_CS_CTRL1   16
 
#define HV_MUX_DATA_CTRL   PHY_REG(776, 16)
 
#define HV_MUX_DATA_CTRL_GEN_TO_MAC   0x0400
 
#define HV_MUX_DATA_CTRL_FORCE_SPEED   0x0004
 

Functions

s32 e1000e_check_reset_block_generic (struct e1000_hw *hw)
 
s32 e1000e_get_phy_id (struct e1000_hw *hw)
 
s32 e1000e_phy_reset_dsp (struct e1000_hw *hw)
 
s32 e1000e_read_phy_reg_mdic (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000e_write_phy_reg_mdic (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000e_read_phy_reg_m88 (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000e_write_phy_reg_m88 (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000_set_page_igp (struct e1000_hw *hw, u16 page)
 
s32 e1000e_read_phy_reg_igp (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000e_read_phy_reg_igp_locked (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000e_write_phy_reg_igp (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000e_write_phy_reg_igp_locked (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000e_read_kmrn_reg (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000e_read_kmrn_reg_locked (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000e_write_kmrn_reg (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000e_write_kmrn_reg_locked (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000_copper_link_setup_82577 (struct e1000_hw *hw)
 
s32 e1000e_copper_link_setup_m88 (struct e1000_hw *hw)
 
s32 e1000e_copper_link_setup_igp (struct e1000_hw *hw)
 
s32 e1000e_setup_copper_link (struct e1000_hw *hw)
 
s32 e1000e_phy_force_speed_duplex_igp (struct e1000_hw *hw)
 
s32 e1000e_phy_force_speed_duplex_m88 (struct e1000_hw *hw)
 
s32 e1000_phy_force_speed_duplex_ife (struct e1000_hw *hw)
 
void e1000e_phy_force_speed_duplex_setup (struct e1000_hw *hw, u16 *phy_ctrl)
 
s32 e1000e_set_d3_lplu_state (struct e1000_hw *hw, bool active)
 
s32 e1000e_check_downshift (struct e1000_hw *hw)
 
s32 e1000_check_polarity_m88 (struct e1000_hw *hw)
 
s32 e1000_check_polarity_igp (struct e1000_hw *hw)
 
s32 e1000_check_polarity_ife (struct e1000_hw *hw)
 
s32 e1000e_phy_has_link_generic (struct e1000_hw *hw, u32 iterations, u32 usec_interval, bool *success)
 
s32 e1000e_get_cable_length_m88 (struct e1000_hw *hw)
 
s32 e1000e_get_cable_length_igp_2 (struct e1000_hw *hw)
 
s32 e1000e_get_phy_info_m88 (struct e1000_hw *hw)
 
s32 e1000e_get_phy_info_igp (struct e1000_hw *hw)
 
s32 e1000_get_phy_info_ife (struct e1000_hw *hw)
 
s32 e1000e_phy_sw_reset (struct e1000_hw *hw)
 
s32 e1000e_phy_hw_reset_generic (struct e1000_hw *hw)
 
s32 e1000e_get_cfg_done (struct e1000_hw *hw)
 
s32 e1000e_phy_init_script_igp3 (struct e1000_hw *hw)
 
enum e1000_phy_type e1000e_get_phy_type_from_id (u32 phy_id)
 
s32 e1000e_determine_phy_address (struct e1000_hw *hw)
 
s32 e1000e_write_phy_reg_bm (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000e_read_phy_reg_bm (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000e_read_phy_reg_bm2 (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000e_write_phy_reg_bm2 (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000_enable_phy_wakeup_reg_access_bm (struct e1000_hw *hw, u16 *phy_reg)
 
s32 e1000_disable_phy_wakeup_reg_access_bm (struct e1000_hw *hw, u16 *phy_reg)
 
void e1000_power_up_phy_copper (struct e1000_hw *hw)
 
void e1000_power_down_phy_copper (struct e1000_hw *hw)
 
s32 e1000e_commit_phy (struct e1000_hw *hw)
 
s32 e1000_read_phy_reg_hv (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000_read_phy_reg_hv_locked (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000_read_phy_reg_page_hv (struct e1000_hw *hw, u32 offset, u16 *data)
 
s32 e1000_write_phy_reg_hv (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000_write_phy_reg_hv_locked (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000_write_phy_reg_page_hv (struct e1000_hw *hw, u32 offset, u16 data)
 
s32 e1000_link_stall_workaround_hv (struct e1000_hw *hw)
 
s32 e1000_check_polarity_82577 (struct e1000_hw *hw)
 
s32 e1000_phy_force_speed_duplex_82577 (struct e1000_hw *hw)
 
s32 e1000_get_phy_info_82577 (struct e1000_hw *hw)
 
s32 e1000_get_cable_length_82577 (struct e1000_hw *hw)
 

Macro Definition Documentation

#define BM_CS_CTRL1   16

Definition at line 96 of file phy.c.

#define BM_PHY_REG_NUM (   offset)
Value:
~MAX_PHY_REG_ADDRESS)))

Definition at line 62 of file phy.c.

#define BM_PHY_REG_PAGE (   offset)    ((u16)(((offset) >> PHY_PAGE_SHIFT) & 0xFFFF))

Definition at line 60 of file phy.c.

#define HV_INTC_FC_PAGE_START   768

Definition at line 67 of file phy.c.

#define HV_MUX_DATA_CTRL   PHY_REG(776, 16)

Definition at line 98 of file phy.c.

#define HV_MUX_DATA_CTRL_FORCE_SPEED   0x0004

Definition at line 100 of file phy.c.

#define HV_MUX_DATA_CTRL_GEN_TO_MAC   0x0400

Definition at line 99 of file phy.c.

#define I82577_ADDR_REG   16

Definition at line 69 of file phy.c.

#define I82577_CFG_ASSERT_CRS_ON_TX   (1 << 15)

Definition at line 71 of file phy.c.

#define I82577_CFG_ENABLE_DOWNSHIFT   (3 << 10) /* auto downshift 100/10 */

Definition at line 72 of file phy.c.

#define I82577_CFG_REG   22

Definition at line 70 of file phy.c.

#define I82577_CTRL_REG   23

Definition at line 73 of file phy.c.

#define I82577_DSTATUS_CABLE_LENGTH   0x03FC

Definition at line 92 of file phy.c.

#define I82577_DSTATUS_CABLE_LENGTH_SHIFT   2

Definition at line 93 of file phy.c.

#define I82577_PHY_CTRL2_AUTO_MDI_MDIX   0x0400

Definition at line 88 of file phy.c.

#define I82577_PHY_CTRL2_MANUAL_MDIX   0x0200

Definition at line 87 of file phy.c.

#define I82577_PHY_CTRL2_MDIX_CFG_MASK   0x0600

Definition at line 89 of file phy.c.

#define I82577_PHY_CTRL_2   18

Definition at line 76 of file phy.c.

#define I82577_PHY_DIAG_STATUS   31

Definition at line 78 of file phy.c.

#define I82577_PHY_STATUS2_MDIX   0x0800

Definition at line 82 of file phy.c.

#define I82577_PHY_STATUS2_REV_POLARITY   0x0400

Definition at line 81 of file phy.c.

#define I82577_PHY_STATUS2_SPEED_1000MBPS   0x0200

Definition at line 84 of file phy.c.

#define I82577_PHY_STATUS2_SPEED_MASK   0x0300

Definition at line 83 of file phy.c.

#define I82577_PHY_STATUS_2   26

Definition at line 77 of file phy.c.

#define I82578_ADDR_REG   29

Definition at line 68 of file phy.c.

#define IGP02E1000_CABLE_LENGTH_TABLE_SIZE   ARRAY_SIZE(e1000_igp_2_cable_length_table)

Definition at line 57 of file phy.c.

#define M88E1000_CABLE_LENGTH_TABLE_SIZE   ARRAY_SIZE(e1000_m88_cable_length_table)

Definition at line 45 of file phy.c.

Function Documentation

s32 e1000_check_polarity_82577 ( struct e1000_hw hw)

e1000_check_polarity_82577 - Checks the polarity. : pointer to the HW structure

Success returns 0, Failure returns -E1000_ERR_PHY (-2)

Polarity is determined based on the PHY specific status register.

Definition at line 3239 of file phy.c.

s32 e1000_check_polarity_ife ( struct e1000_hw hw)

e1000_check_polarity_ife - Check cable polarity for IFE PHY : pointer to the HW structure

Polarity is determined on the polarity reversal feature being enabled.

Definition at line 1742 of file phy.c.

s32 e1000_check_polarity_igp ( struct e1000_hw hw)

e1000_check_polarity_igp - Checks the polarity. : pointer to the HW structure

Success returns 0, Failure returns -E1000_ERR_PHY (-2)

Polarity is determined based on the PHY port status register, and the current speed (since there is no polarity at 100Mbps).

Definition at line 1699 of file phy.c.

s32 e1000_check_polarity_m88 ( struct e1000_hw hw)

e1000_check_polarity_m88 - Checks the polarity. : pointer to the HW structure

Success returns 0, Failure returns -E1000_ERR_PHY (-2)

Polarity is determined based on the PHY specific status register.

Definition at line 1674 of file phy.c.

s32 e1000_copper_link_setup_82577 ( struct e1000_hw hw)

e1000_copper_link_setup_82577 - Setup 82577 PHY for copper link : pointer to the HW structure

Sets up Carrier-sense on Transmit and downshift values.

Definition at line 687 of file phy.c.

s32 e1000_disable_phy_wakeup_reg_access_bm ( struct e1000_hw hw,
u16 phy_reg 
)

e1000_disable_phy_wakeup_reg_access_bm - disable access to BM wakeup regs : pointer to the HW structure : pointer to original contents of BM_WUC_ENABLE_REG

Restore BM_WUC_ENABLE_REG to its original value.

Assumes semaphore already acquired and *phy_reg is the contents of the BM_WUC_ENABLE_REG before register(s) on BM_WUC_PAGE were accessed by caller.

Definition at line 2719 of file phy.c.

s32 e1000_enable_phy_wakeup_reg_access_bm ( struct e1000_hw hw,
u16 phy_reg 
)

e1000_enable_phy_wakeup_reg_access_bm - enable access to BM wakeup registers : pointer to the HW structure : pointer to store original contents of BM_WUC_ENABLE_REG

Assumes semaphore already acquired and phy_reg points to a valid memory address to store contents of the BM_WUC_ENABLE_REG register.

Definition at line 2664 of file phy.c.

s32 e1000_get_cable_length_82577 ( struct e1000_hw hw)

e1000_get_cable_length_82577 - Determine cable length for 82577 PHY : pointer to the HW structure

Reads the diagnostic status register and verifies result is valid before placing it in the phy_cable_length field.

Definition at line 3369 of file phy.c.

s32 e1000_get_phy_info_82577 ( struct e1000_hw hw)

e1000_get_phy_info_82577 - Retrieve I82577 PHY information : pointer to the HW structure

Read PHY status to determine if link is up. If link is up, then set/determine 10base-T extended distance and polarity correction. Read PHY port status to determine MDI/MDIx and speed. Based on the speed, determine on the cable length, local and remote receiver.

Definition at line 3308 of file phy.c.

s32 e1000_get_phy_info_ife ( struct e1000_hw hw)

e1000_get_phy_info_ife - Retrieves various IFE PHY states : pointer to the HW structure

Populates "phy" structure with various feature states.

Definition at line 2098 of file phy.c.

s32 e1000_link_stall_workaround_hv ( struct e1000_hw hw)

e1000_link_stall_workaround_hv - Si workaround : pointer to the HW structure

This function works around a Si bug where the link partner can get a link up indication before the PHY does. If small packets are sent by the link partner they can be placed in the packet buffer without being properly accounted for by the PHY and will stall preventing further packets from being received. The workaround is to clear the packet buffer after the PHY detects link up.

Definition at line 3195 of file phy.c.

s32 e1000_phy_force_speed_duplex_82577 ( struct e1000_hw hw)

e1000_phy_force_speed_duplex_82577 - Force speed/duplex for I82577 PHY : pointer to the HW structure

Calls the PHY setup function to force speed and duplex.

Definition at line 3261 of file phy.c.

s32 e1000_phy_force_speed_duplex_ife ( struct e1000_hw hw)

e1000_phy_force_speed_duplex_ife - Force PHY speed & duplex : pointer to the HW structure

Forces the speed and duplex settings of the PHY. This is a function pointer entry point only called by PHY setup routines.

Definition at line 1433 of file phy.c.

void e1000_power_down_phy_copper ( struct e1000_hw hw)

e1000_power_down_phy_copper - Restore copper link in case of PHY power down : pointer to the HW structure

In the case of a PHY power down to save power, or to turn off link during a driver unload, or wake on lan is not enabled, restore the link to previous settings.

Definition at line 2843 of file phy.c.

void e1000_power_up_phy_copper ( struct e1000_hw hw)

e1000_power_up_phy_copper - Restore copper link in case of PHY power down : pointer to the HW structure

In the case of a PHY power down to save power, or to turn off link during a driver unload, or wake on lan is not enabled, restore the link to previous settings.

Definition at line 2825 of file phy.c.

s32 e1000_read_phy_reg_hv ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000_read_phy_reg_hv - Read HV PHY register : pointer to the HW structure : register offset to be read : pointer to the read data

Acquires semaphore then reads the PHY register at offset and stores the retrieved information in data. Release the acquired semaphore before exiting.

Definition at line 2967 of file phy.c.

s32 e1000_read_phy_reg_hv_locked ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000_read_phy_reg_hv_locked - Read HV PHY register : pointer to the HW structure : register offset to be read : pointer to the read data

Reads the PHY register at offset and stores the retrieved information in data. Assumes semaphore already acquired.

Definition at line 2981 of file phy.c.

s32 e1000_read_phy_reg_page_hv ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000_read_phy_reg_page_hv - Read HV PHY register : pointer to the HW structure : register offset to write to : data to write at register offset

Reads the PHY register at offset and stores the retrieved information in data. Assumes semaphore already acquired and page already set.

Definition at line 2995 of file phy.c.

s32 e1000_set_page_igp ( struct e1000_hw hw,
u16  page 
)

Definition at line 358 of file phy.c.

s32 e1000_write_phy_reg_hv ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000_write_phy_reg_hv - Write HV PHY register : pointer to the HW structure : register offset to write to : data to write at register offset

Acquires semaphore then writes the data to PHY register at the offset. Release the acquired semaphores before exiting.

Definition at line 3091 of file phy.c.

s32 e1000_write_phy_reg_hv_locked ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000_write_phy_reg_hv_locked - Write HV PHY register : pointer to the HW structure : register offset to write to : data to write at register offset

Writes the data to PHY register at the offset. Assumes semaphore already acquired.

Definition at line 3105 of file phy.c.

s32 e1000_write_phy_reg_page_hv ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000_write_phy_reg_page_hv - Write HV PHY register : pointer to the HW structure : register offset to write to : data to write at register offset

Writes the data to PHY register at the offset. Assumes semaphore already acquired and page already set.

Definition at line 3119 of file phy.c.

s32 e1000e_check_downshift ( struct e1000_hw hw)

e1000e_check_downshift - Checks whether a downshift in speed occurred : pointer to the HW structure

Success returns 0, Failure returns 1

A downshift is detected by querying the PHY link health.

Definition at line 1633 of file phy.c.

s32 e1000e_check_reset_block_generic ( struct e1000_hw hw)

e1000e_check_reset_block_generic - Check if PHY reset is blocked : pointer to the HW structure

Read the PHY management control register and check whether a PHY reset is blocked. If a reset is not blocked return 0, otherwise return E1000_BLK_PHY_RESET (12).

Definition at line 110 of file phy.c.

s32 e1000e_commit_phy ( struct e1000_hw hw)

e1000e_commit_phy - 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 2861 of file phy.c.

s32 e1000e_copper_link_setup_igp ( struct e1000_hw hw)

e1000e_copper_link_setup_igp - Setup igp PHY's for copper link : pointer to the HW structure

Sets up LPLU, MDI/MDI-X, polarity, Smartspeed and Master/Slave config for igp PHY's.

Definition at line 890 of file phy.c.

s32 e1000e_copper_link_setup_m88 ( struct e1000_hw hw)

e1000e_copper_link_setup_m88 - Setup m88 PHY's for copper link : pointer to the HW structure

Sets up MDI/MDI-X and polarity for m88 PHY's. If necessary, transmit clock and downshift values are set also.

Definition at line 742 of file phy.c.

s32 e1000e_determine_phy_address ( struct e1000_hw hw)

e1000e_determine_phy_address - Determines PHY address. : pointer to the HW structure

This uses a trial and error method to loop through possible PHY addresses. It tests each by reading the PHY ID registers and checking for a match.

Definition at line 2404 of file phy.c.

s32 e1000e_get_cable_length_igp_2 ( struct e1000_hw hw)

e1000e_get_cable_length_igp_2 - Determine cable length for igp2 PHY : pointer to the HW structure

The automatic gain control (agc) normalizes the amplitude of the received signal, adjusting for the attenuation produced by the cable. By reading the AGC registers, which represent the combination of coarse and fine gain value, the value can be put into a lookup table to obtain the approximate cable length for each channel.

Definition at line 1896 of file phy.c.

s32 e1000e_get_cable_length_m88 ( struct e1000_hw hw)

e1000e_get_cable_length_m88 - Determine cable length for m88 PHY : pointer to the HW structure

Reads the PHY specific status register to retrieve the cable length information. The cable length is determined by averaging the minimum and maximum values to get the "average" cable length. The m88 PHY has four possible cable length values, which are: Register Value Cable Length 0 < 50 meters 1 50 - 80 meters 2 80 - 110 meters 3 110 - 140 meters 4 > 140 meters

Definition at line 1861 of file phy.c.

s32 e1000e_get_cfg_done ( struct e1000_hw hw)

e1000e_get_cfg_done - Generic configuration done : pointer to the HW structure

Generic function to wait 10 milli-seconds for configuration to complete and return success.

Definition at line 2218 of file phy.c.

s32 e1000e_get_phy_id ( struct e1000_hw hw)

e1000e_get_phy_id - Retrieve the PHY ID and revision : pointer to the HW structure

Reads the PHY registers and stores the PHY ID and possibly the PHY revision in the hardware structure.

Definition at line 127 of file phy.c.

s32 e1000e_get_phy_info_igp ( struct e1000_hw hw)

e1000e_get_phy_info_igp - Retrieve igp PHY information : pointer to the HW structure

Read PHY status to determine if link is up. If link is up, then set/determine 10base-T extended distance and polarity correction. Read PHY port status to determine MDI/MDIx and speed. Based on the speed, determine on the cable length, local and remote receiver.

Definition at line 2038 of file phy.c.

s32 e1000e_get_phy_info_m88 ( struct e1000_hw hw)

e1000e_get_phy_info_m88 - Retrieve PHY information : pointer to the HW structure

Valid for only copper links. Read the PHY status register (sticky read) to verify that link is up. Read the PHY special control register to determine the polarity and 10base-T extended distance. Read the PHY special status register to determine MDI/MDIx and current speed. If speed is 1000, then determine cable length, local and remote receiver.

Definition at line 1965 of file phy.c.

enum e1000_phy_type e1000e_get_phy_type_from_id ( u32  phy_id)

e1000e_get_phy_type_from_id - Get PHY type from id : phy_id read from the phy

Returns the phy type from the id.

Definition at line 2348 of file phy.c.

s32 e1000e_phy_force_speed_duplex_igp ( struct e1000_hw hw)

e1000e_phy_force_speed_duplex_igp - Force speed/duplex for igp PHY : pointer to the HW structure

Calls the PHY setup function to force speed and duplex. Clears the auto-crossover to force MDI manually. Waits for link and returns successful if link up is successful, else -E1000_ERR_PHY (-2).

Definition at line 1259 of file phy.c.

s32 e1000e_phy_force_speed_duplex_m88 ( struct e1000_hw hw)

e1000e_phy_force_speed_duplex_m88 - Force speed/duplex for m88 PHY : pointer to the HW structure

Calls the PHY setup function to force speed and duplex. Clears the auto-crossover to force MDI manually. Resets the PHY to commit the changes. If time expires while waiting for link up, we reset the DSP. After reset, TX_CLK and CRS on Tx must be set. Return successful upon successful completion, else return corresponding error code.

Definition at line 1324 of file phy.c.

void e1000e_phy_force_speed_duplex_setup ( struct e1000_hw hw,
u16 phy_ctrl 
)

e1000e_phy_force_speed_duplex_setup - Configure forced PHY speed/duplex : pointer to the HW structure : pointer to current value of PHY_CONTROL

Forces speed and duplex on the PHY by doing the following: disable flow control, force speed/duplex on the MAC, disable auto speed detection, disable auto-negotiation, configure duplex, configure speed, configure the collision distance, write configuration to CTRL register. The caller must write to the PHY_CONTROL register for these settings to take affect.

Definition at line 1499 of file phy.c.

s32 e1000e_phy_has_link_generic ( struct e1000_hw hw,
u32  iterations,
u32  usec_interval,
bool success 
)

e1000e_phy_has_link_generic - Polls PHY for link : pointer to the HW structure : number of times to poll for link : delay between polling attempts : pointer to whether polling was successful or not

Polls the PHY status register for link, 'iterations' number of times.

Definition at line 1810 of file phy.c.

s32 e1000e_phy_hw_reset_generic ( struct e1000_hw hw)

e1000e_phy_hw_reset_generic - PHY hardware reset : pointer to the HW structure

Verify the reset block is not blocking us from resetting. Acquire semaphore (if necessary) and read/set/write the device control reset bit in the PHY. Wait the appropriate delay time for the device to reset and release the semaphore (if necessary).

Definition at line 2179 of file phy.c.

s32 e1000e_phy_init_script_igp3 ( struct e1000_hw hw)

e1000e_phy_init_script_igp3 - Inits the IGP3 PHY : pointer to the HW structure

Initializes a Intel Gigabit PHY3 when an EEPROM is not present.

Definition at line 2231 of file phy.c.

s32 e1000e_phy_reset_dsp ( struct e1000_hw hw)

e1000e_phy_reset_dsp - Reset PHY DSP : pointer to the HW structure

Reset the digital signal processor.

Definition at line 166 of file phy.c.

s32 e1000e_phy_sw_reset ( struct e1000_hw hw)

e1000e_phy_sw_reset - PHY software reset : pointer to the HW structure

Does a software reset of the PHY by reading the PHY control register and setting/write the control register reset bit to the PHY.

Definition at line 2151 of file phy.c.

s32 e1000e_read_kmrn_reg ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000e_read_kmrn_reg - Read kumeran register : pointer to the HW structure : register offset to be read : pointer to the read data

Acquires semaphore then reads the PHY register at offset using the kumeran interface. The information retrieved is stored in data. Release the acquired semaphore before exiting.

Definition at line 554 of file phy.c.

s32 e1000e_read_kmrn_reg_locked ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000e_read_kmrn_reg_locked - Read kumeran register : pointer to the HW structure : register offset to be read : pointer to the read data

Reads the PHY register at offset using the kumeran interface. The information retrieved is stored in data. Assumes semaphore already acquired.

Definition at line 569 of file phy.c.

s32 e1000e_read_phy_reg_bm ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000e_read_phy_reg_bm - Read BM PHY register : pointer to the HW structure : register offset to be read : pointer to the read data

Acquires semaphore, if necessary, then reads the PHY register at offset and storing the retrieved information in data. Release any acquired semaphores before exiting.

Definition at line 2519 of file phy.c.

s32 e1000e_read_phy_reg_bm2 ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000e_read_phy_reg_bm2 - Read BM PHY register : pointer to the HW structure : register offset to be read : pointer to the read data

Acquires semaphore, if necessary, then reads the PHY register at offset and storing the retrieved information in data. Release any acquired semaphores before exiting.

Definition at line 2577 of file phy.c.

s32 e1000e_read_phy_reg_igp ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000e_read_phy_reg_igp - Read igp PHY register : pointer to the HW structure : register offset to be read : pointer to the read data

Acquires semaphore then reads the PHY register at offset and stores the retrieved information in data. Release the acquired semaphore before exiting.

Definition at line 416 of file phy.c.

s32 e1000e_read_phy_reg_igp_locked ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000e_read_phy_reg_igp_locked - Read igp PHY register : pointer to the HW structure : register offset to be read : pointer to the read data

Reads the PHY register at offset and stores the retrieved information in data. Assumes semaphore already acquired.

Definition at line 430 of file phy.c.

s32 e1000e_read_phy_reg_m88 ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000e_read_phy_reg_m88 - Read m88 PHY register : pointer to the HW structure : register offset to be read : pointer to the read data

Acquires semaphore, if necessary, then reads the PHY register at offset and storing the retrieved information in data. Release any acquired semaphores before exiting.

Definition at line 308 of file phy.c.

s32 e1000e_read_phy_reg_mdic ( struct e1000_hw hw,
u32  offset,
u16 data 
)

e1000e_read_phy_reg_mdic - Read MDI control register : pointer to the HW structure : register offset to be read : pointer to the read data

Reads the MDI control register in the PHY at offset and stores the information read to data.

Definition at line 186 of file phy.c.

s32 e1000e_set_d3_lplu_state ( struct e1000_hw hw,
bool  active 
)

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

Definition at line 1561 of file phy.c.

s32 e1000e_setup_copper_link ( struct e1000_hw hw)

e1000e_setup_copper_link - Configure copper link settings : pointer to the HW structure

Calls the appropriate function to configure the link for auto-neg or forced speed and duplex. Then we check for link, once link is established calls to configure collision distance and flow control are called. If link is not established, we return -E1000_ERR_PHY (-2).

Definition at line 1205 of file phy.c.

s32 e1000e_write_kmrn_reg ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000e_write_kmrn_reg - Write kumeran register : pointer to the HW structure : register offset to write to : data to write at register offset

Acquires semaphore then writes the data to the PHY register at the offset using the kumeran interface. Release the acquired semaphore before exiting.

Definition at line 623 of file phy.c.

s32 e1000e_write_kmrn_reg_locked ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000e_write_kmrn_reg_locked - Write kumeran register : pointer to the HW structure : register offset to write to : data to write at register offset

Write the data to PHY register at the offset using the kumeran interface. Assumes semaphore already acquired.

Definition at line 637 of file phy.c.

s32 e1000e_write_phy_reg_bm ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000e_write_phy_reg_bm - Write BM PHY register : pointer to the HW structure : register offset to write to : data to write at register offset

Acquires semaphore, if necessary, then writes the data to PHY register at the offset. Release any acquired semaphores before exiting.

Definition at line 2460 of file phy.c.

s32 e1000e_write_phy_reg_bm2 ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000e_write_phy_reg_bm2 - Write BM PHY register : pointer to the HW structure : register offset to write to : data to write at register offset

Acquires semaphore, if necessary, then writes the data to PHY register at the offset. Release any acquired semaphores before exiting.

Definition at line 2621 of file phy.c.

s32 e1000e_write_phy_reg_igp ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000e_write_phy_reg_igp - Write igp PHY register : pointer to the HW structure : register offset to write to : data to write at register offset

Acquires semaphore then writes the data to PHY register at the offset. Release any acquired semaphores before exiting.

Definition at line 482 of file phy.c.

s32 e1000e_write_phy_reg_igp_locked ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000e_write_phy_reg_igp_locked - Write igp PHY register : pointer to the HW structure : register offset to write to : data to write at register offset

Writes the data to PHY register at the offset. Assumes semaphore already acquired.

Definition at line 496 of file phy.c.

s32 e1000e_write_phy_reg_m88 ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000e_write_phy_reg_m88 - Write m88 PHY register : pointer to the HW structure : register offset to write to : data to write at register offset

Acquires semaphore, if necessary, then writes the data to PHY register at the offset. Release any acquired semaphores before exiting.

Definition at line 333 of file phy.c.

s32 e1000e_write_phy_reg_mdic ( struct e1000_hw hw,
u32  offset,
u16  data 
)

e1000e_write_phy_reg_mdic - Write MDI control register : pointer to the HW structure : register offset to write to : data to write to register at offset

Writes data to MDI control register in the PHY at offset.

Definition at line 246 of file phy.c.