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

Go to the source code of this file.

Macros

#define IXGBE_I2C_EEPROM_DEV_ADDR   0xA0
 
#define IXGBE_SFF_IDENTIFIER   0x0
 
#define IXGBE_SFF_IDENTIFIER_SFP   0x3
 
#define IXGBE_SFF_VENDOR_OUI_BYTE0   0x25
 
#define IXGBE_SFF_VENDOR_OUI_BYTE1   0x26
 
#define IXGBE_SFF_VENDOR_OUI_BYTE2   0x27
 
#define IXGBE_SFF_1GBE_COMP_CODES   0x6
 
#define IXGBE_SFF_10GBE_COMP_CODES   0x3
 
#define IXGBE_SFF_CABLE_TECHNOLOGY   0x8
 
#define IXGBE_SFF_CABLE_SPEC_COMP   0x3C
 
#define IXGBE_SFF_DA_PASSIVE_CABLE   0x4
 
#define IXGBE_SFF_DA_ACTIVE_CABLE   0x8
 
#define IXGBE_SFF_DA_SPEC_ACTIVE_LIMITING   0x4
 
#define IXGBE_SFF_1GBASESX_CAPABLE   0x1
 
#define IXGBE_SFF_1GBASELX_CAPABLE   0x2
 
#define IXGBE_SFF_1GBASET_CAPABLE   0x8
 
#define IXGBE_SFF_10GBASESR_CAPABLE   0x10
 
#define IXGBE_SFF_10GBASELR_CAPABLE   0x20
 
#define IXGBE_I2C_EEPROM_READ_MASK   0x100
 
#define IXGBE_I2C_EEPROM_STATUS_MASK   0x3
 
#define IXGBE_I2C_EEPROM_STATUS_NO_OPERATION   0x0
 
#define IXGBE_I2C_EEPROM_STATUS_PASS   0x1
 
#define IXGBE_I2C_EEPROM_STATUS_FAIL   0x2
 
#define IXGBE_I2C_EEPROM_STATUS_IN_PROGRESS   0x3
 
#define IXGBE_TAF_SYM_PAUSE   0x400
 
#define IXGBE_TAF_ASM_PAUSE   0x800
 
#define IXGBE_SFF_VENDOR_OUI_BYTE0_SHIFT   24
 
#define IXGBE_SFF_VENDOR_OUI_BYTE1_SHIFT   16
 
#define IXGBE_SFF_VENDOR_OUI_BYTE2_SHIFT   8
 
#define IXGBE_SFF_VENDOR_OUI_TYCO   0x00407600
 
#define IXGBE_SFF_VENDOR_OUI_FTL   0x00906500
 
#define IXGBE_SFF_VENDOR_OUI_AVAGO   0x00176A00
 
#define IXGBE_SFF_VENDOR_OUI_INTEL   0x001B2100
 
#define IXGBE_I2C_T_HD_STA   4
 
#define IXGBE_I2C_T_LOW   5
 
#define IXGBE_I2C_T_HIGH   4
 
#define IXGBE_I2C_T_SU_STA   5
 
#define IXGBE_I2C_T_HD_DATA   5
 
#define IXGBE_I2C_T_SU_DATA   1
 
#define IXGBE_I2C_T_RISE   1
 
#define IXGBE_I2C_T_FALL   1
 
#define IXGBE_I2C_T_SU_STO   4
 
#define IXGBE_I2C_T_BUF   5
 
#define IXGBE_TN_LASI_STATUS_REG   0x9005
 
#define IXGBE_TN_LASI_STATUS_TEMP_ALARM   0x0008
 

Functions

s32 ixgbe_init_phy_ops_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_identify_phy_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_reset_phy_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_read_phy_reg_generic (struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, u16 *phy_data)
 
s32 ixgbe_write_phy_reg_generic (struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, u16 phy_data)
 
s32 ixgbe_setup_phy_link_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_setup_phy_link_speed_generic (struct ixgbe_hw *hw, ixgbe_link_speed speed, bool autoneg, bool autoneg_wait_to_complete)
 
s32 ixgbe_get_copper_link_capabilities_generic (struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *autoneg)
 
s32 ixgbe_check_phy_link_tnx (struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *link_up)
 
s32 ixgbe_setup_phy_link_tnx (struct ixgbe_hw *hw)
 
s32 ixgbe_get_phy_firmware_version_tnx (struct ixgbe_hw *hw, u16 *firmware_version)
 
s32 ixgbe_get_phy_firmware_version_generic (struct ixgbe_hw *hw, u16 *firmware_version)
 
s32 ixgbe_reset_phy_nl (struct ixgbe_hw *hw)
 
s32 ixgbe_identify_sfp_module_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_get_sfp_init_sequence_offsets (struct ixgbe_hw *hw, u16 *list_offset, u16 *data_offset)
 
s32 ixgbe_tn_check_overtemp (struct ixgbe_hw *hw)
 
s32 ixgbe_read_i2c_byte_generic (struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, u8 *data)
 
s32 ixgbe_write_i2c_byte_generic (struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, u8 data)
 
s32 ixgbe_read_i2c_eeprom_generic (struct ixgbe_hw *hw, u8 byte_offset, u8 *eeprom_data)
 
s32 ixgbe_write_i2c_eeprom_generic (struct ixgbe_hw *hw, u8 byte_offset, u8 eeprom_data)
 

Macro Definition Documentation

#define IXGBE_I2C_EEPROM_DEV_ADDR   0xA0

Definition at line 32 of file ixgbe_phy.h.

#define IXGBE_I2C_EEPROM_READ_MASK   0x100

Definition at line 54 of file ixgbe_phy.h.

#define IXGBE_I2C_EEPROM_STATUS_FAIL   0x2

Definition at line 58 of file ixgbe_phy.h.

#define IXGBE_I2C_EEPROM_STATUS_IN_PROGRESS   0x3

Definition at line 59 of file ixgbe_phy.h.

#define IXGBE_I2C_EEPROM_STATUS_MASK   0x3

Definition at line 55 of file ixgbe_phy.h.

#define IXGBE_I2C_EEPROM_STATUS_NO_OPERATION   0x0

Definition at line 56 of file ixgbe_phy.h.

#define IXGBE_I2C_EEPROM_STATUS_PASS   0x1

Definition at line 57 of file ixgbe_phy.h.

#define IXGBE_I2C_T_BUF   5

Definition at line 86 of file ixgbe_phy.h.

#define IXGBE_I2C_T_FALL   1

Definition at line 84 of file ixgbe_phy.h.

#define IXGBE_I2C_T_HD_DATA   5

Definition at line 81 of file ixgbe_phy.h.

#define IXGBE_I2C_T_HD_STA   4

Definition at line 77 of file ixgbe_phy.h.

#define IXGBE_I2C_T_HIGH   4

Definition at line 79 of file ixgbe_phy.h.

#define IXGBE_I2C_T_LOW   5

Definition at line 78 of file ixgbe_phy.h.

#define IXGBE_I2C_T_RISE   1

Definition at line 83 of file ixgbe_phy.h.

#define IXGBE_I2C_T_SU_DATA   1

Definition at line 82 of file ixgbe_phy.h.

#define IXGBE_I2C_T_SU_STA   5

Definition at line 80 of file ixgbe_phy.h.

#define IXGBE_I2C_T_SU_STO   4

Definition at line 85 of file ixgbe_phy.h.

#define IXGBE_SFF_10GBASELR_CAPABLE   0x20

Definition at line 53 of file ixgbe_phy.h.

#define IXGBE_SFF_10GBASESR_CAPABLE   0x10

Definition at line 52 of file ixgbe_phy.h.

#define IXGBE_SFF_10GBE_COMP_CODES   0x3

Definition at line 41 of file ixgbe_phy.h.

#define IXGBE_SFF_1GBASELX_CAPABLE   0x2

Definition at line 50 of file ixgbe_phy.h.

#define IXGBE_SFF_1GBASESX_CAPABLE   0x1

Definition at line 49 of file ixgbe_phy.h.

#define IXGBE_SFF_1GBASET_CAPABLE   0x8

Definition at line 51 of file ixgbe_phy.h.

#define IXGBE_SFF_1GBE_COMP_CODES   0x6

Definition at line 40 of file ixgbe_phy.h.

#define IXGBE_SFF_CABLE_SPEC_COMP   0x3C

Definition at line 43 of file ixgbe_phy.h.

#define IXGBE_SFF_CABLE_TECHNOLOGY   0x8

Definition at line 42 of file ixgbe_phy.h.

#define IXGBE_SFF_DA_ACTIVE_CABLE   0x8

Definition at line 47 of file ixgbe_phy.h.

#define IXGBE_SFF_DA_PASSIVE_CABLE   0x4

Definition at line 46 of file ixgbe_phy.h.

#define IXGBE_SFF_DA_SPEC_ACTIVE_LIMITING   0x4

Definition at line 48 of file ixgbe_phy.h.

#define IXGBE_SFF_IDENTIFIER   0x0

Definition at line 35 of file ixgbe_phy.h.

#define IXGBE_SFF_IDENTIFIER_SFP   0x3

Definition at line 36 of file ixgbe_phy.h.

#define IXGBE_SFF_VENDOR_OUI_AVAGO   0x00176A00

Definition at line 73 of file ixgbe_phy.h.

#define IXGBE_SFF_VENDOR_OUI_BYTE0   0x25

Definition at line 37 of file ixgbe_phy.h.

#define IXGBE_SFF_VENDOR_OUI_BYTE0_SHIFT   24

Definition at line 66 of file ixgbe_phy.h.

#define IXGBE_SFF_VENDOR_OUI_BYTE1   0x26

Definition at line 38 of file ixgbe_phy.h.

#define IXGBE_SFF_VENDOR_OUI_BYTE1_SHIFT   16

Definition at line 67 of file ixgbe_phy.h.

#define IXGBE_SFF_VENDOR_OUI_BYTE2   0x27

Definition at line 39 of file ixgbe_phy.h.

#define IXGBE_SFF_VENDOR_OUI_BYTE2_SHIFT   8

Definition at line 68 of file ixgbe_phy.h.

#define IXGBE_SFF_VENDOR_OUI_FTL   0x00906500

Definition at line 72 of file ixgbe_phy.h.

#define IXGBE_SFF_VENDOR_OUI_INTEL   0x001B2100

Definition at line 74 of file ixgbe_phy.h.

#define IXGBE_SFF_VENDOR_OUI_TYCO   0x00407600

Definition at line 71 of file ixgbe_phy.h.

#define IXGBE_TAF_ASM_PAUSE   0x800

Definition at line 63 of file ixgbe_phy.h.

#define IXGBE_TAF_SYM_PAUSE   0x400

Definition at line 62 of file ixgbe_phy.h.

#define IXGBE_TN_LASI_STATUS_REG   0x9005

Definition at line 88 of file ixgbe_phy.h.

#define IXGBE_TN_LASI_STATUS_TEMP_ALARM   0x0008

Definition at line 89 of file ixgbe_phy.h.

Function Documentation

s32 ixgbe_check_phy_link_tnx ( struct ixgbe_hw hw,
ixgbe_link_speed speed,
bool link_up 
)

ixgbe_check_phy_link_tnx - Determine link and speed status : pointer to hardware structure

Reads the VS1 register to determine if link is up and the current speed for the PHY.

Definition at line 566 of file ixgbe_phy.c.

s32 ixgbe_get_copper_link_capabilities_generic ( struct ixgbe_hw hw,
ixgbe_link_speed speed,
bool autoneg 
)

ixgbe_get_copper_link_capabilities_generic - Determines link capabilities : pointer to hardware structure : pointer to link speed : boolean auto-negotiation value

Determines the link capabilities by reading the AUTOC register.

Definition at line 534 of file ixgbe_phy.c.

s32 ixgbe_get_phy_firmware_version_generic ( struct ixgbe_hw hw,
u16 firmware_version 
)

ixgbe_get_phy_firmware_version_generic - Gets the PHY Firmware Version : pointer to hardware structure : pointer to the PHY Firmware Version

Definition at line 722 of file ixgbe_phy.c.

s32 ixgbe_get_phy_firmware_version_tnx ( struct ixgbe_hw hw,
u16 firmware_version 
)

ixgbe_get_phy_firmware_version_tnx - Gets the PHY Firmware Version : pointer to hardware structure : pointer to the PHY Firmware Version

Definition at line 705 of file ixgbe_phy.c.

s32 ixgbe_get_sfp_init_sequence_offsets ( struct ixgbe_hw hw,
u16 list_offset,
u16 data_offset 
)

ixgbe_get_sfp_init_sequence_offsets - Provides offset of PHY init sequence : pointer to hardware structure : offset to the SFP ID list : offset to the SFP data block

Checks the MAC's EEPROM to see if it supports a given SFP+ module type, if so it returns the offsets to the phy init sequence block.

Definition at line 1122 of file ixgbe_phy.c.

s32 ixgbe_identify_phy_generic ( struct ixgbe_hw hw)

ixgbe_identify_phy_generic - Get physical layer module : pointer to hardware structure

Determines the physical layer module found on the current adapter.

Definition at line 56 of file ixgbe_phy.c.

s32 ixgbe_identify_sfp_module_generic ( struct ixgbe_hw hw)

ixgbe_identify_sfp_module_generic - Identifies SFP modules : pointer to hardware structure

Searches for and identifies the SFP module and assigns appropriate PHY type.

Definition at line 835 of file ixgbe_phy.c.

s32 ixgbe_init_phy_ops_generic ( struct ixgbe_hw hw)
s32 ixgbe_read_i2c_byte_generic ( struct ixgbe_hw hw,
u8  byte_offset,
u8  dev_addr,
u8 data 
)

ixgbe_read_i2c_byte_generic - Reads 8 bit word over I2C : pointer to hardware structure : byte offset to read : value read

Performs byte read operation to SFP module's EEPROM over I2C interface at a specified device address.

Definition at line 1233 of file ixgbe_phy.c.

s32 ixgbe_read_i2c_eeprom_generic ( struct ixgbe_hw hw,
u8  byte_offset,
u8 eeprom_data 
)

ixgbe_read_i2c_eeprom_generic - Reads 8 bit EEPROM word over I2C interface : pointer to hardware structure : EEPROM byte offset to read : value read

Performs byte read operation to SFP module's EEPROM over I2C interface.

Definition at line 1200 of file ixgbe_phy.c.

s32 ixgbe_read_phy_reg_generic ( struct ixgbe_hw hw,
u32  reg_addr,
u32  device_type,
u16 phy_data 
)

ixgbe_read_phy_reg_generic - Reads a value from a specified PHY register : pointer to hardware structure : 32 bit address of PHY register to read : Pointer to read data from PHY register

Definition at line 212 of file ixgbe_phy.c.

s32 ixgbe_reset_phy_generic ( struct ixgbe_hw hw)

ixgbe_reset_phy_generic - Performs a PHY reset : pointer to hardware structure

Definition at line 157 of file ixgbe_phy.c.

s32 ixgbe_reset_phy_nl ( struct ixgbe_hw hw)

ixgbe_reset_phy_nl - Performs a PHY reset : pointer to hardware structure

Definition at line 738 of file ixgbe_phy.c.

s32 ixgbe_setup_phy_link_generic ( struct ixgbe_hw hw)

ixgbe_setup_phy_link_generic - Set and restart autoneg : pointer to hardware structure

Restart autonegotiation and PHY and waits for completion.

Definition at line 403 of file ixgbe_phy.c.

s32 ixgbe_setup_phy_link_speed_generic ( struct ixgbe_hw hw,
ixgbe_link_speed  speed,
bool  autoneg,
bool  autoneg_wait_to_complete 
)

ixgbe_setup_phy_link_speed_generic - Sets the auto advertised capabilities : pointer to hardware structure : new link speed : true if autonegotiation enabled

Definition at line 499 of file ixgbe_phy.c.

s32 ixgbe_setup_phy_link_tnx ( struct ixgbe_hw hw)

ixgbe_setup_phy_link_tnx - Set and restart autoneg : pointer to hardware structure

Restart autonegotiation and PHY and waits for completion.

Definition at line 613 of file ixgbe_phy.c.

s32 ixgbe_tn_check_overtemp ( struct ixgbe_hw hw)

ixgbe_tn_check_overtemp - Checks if an overtemp occurred. : pointer to hardware structure

Checks if the LASI temp alarm status was triggered due to overtemp

Definition at line 1728 of file ixgbe_phy.c.

s32 ixgbe_write_i2c_byte_generic ( struct ixgbe_hw hw,
u8  byte_offset,
u8  dev_addr,
u8  data 
)

ixgbe_write_i2c_byte_generic - Writes 8 bit word over I2C : pointer to hardware structure : byte offset to write : value to write

Performs byte write operation to SFP module's EEPROM over I2C interface at a specified device address.

Definition at line 1322 of file ixgbe_phy.c.

s32 ixgbe_write_i2c_eeprom_generic ( struct ixgbe_hw hw,
u8  byte_offset,
u8  eeprom_data 
)

ixgbe_write_i2c_eeprom_generic - Writes 8 bit EEPROM word over I2C interface : pointer to hardware structure : EEPROM byte offset to write : value to write

Performs byte write operation to SFP module's EEPROM over I2C interface.

Definition at line 1216 of file ixgbe_phy.c.

s32 ixgbe_write_phy_reg_generic ( struct ixgbe_hw hw,
u32  reg_addr,
u32  device_type,
u16  phy_data 
)

ixgbe_write_phy_reg_generic - Writes a value to specified PHY register : pointer to hardware structure : 32 bit PHY register to write : 5 bit device type : Data to write to the PHY register

Definition at line 311 of file ixgbe_phy.c.