⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e1000_api.c

📁 linux系统的网卡驱动包
💻 C
📖 第 1 页 / 共 3 页
字号:
 *  e1000_mng_write_cmd_header - Writes manageability command header *  @hw: pointer to the HW structure *  @hdr: pointer to the host interface command header * *  Writes the command header after does the checksum calculation. **/s32 e1000_mng_write_cmd_header(struct e1000_hw *hw,                               struct e1000_host_mng_command_header *hdr){	if (hw->func.mng_write_cmd_header)		return hw->func.mng_write_cmd_header(hw, hdr);	return E1000_NOT_IMPLEMENTED;}/** *  e1000_mng_enable_host_if - Checks host interface is enabled *  @hw: pointer to the HW structure * *  Returns E1000_success upon success, else E1000_ERR_HOST_INTERFACE_COMMAND * *  This function checks whether the HOST IF is enabled for command operaton *  and also checks whether the previous command is completed.  It busy waits *  in case of previous command is not completed. **/s32 e1000_mng_enable_host_if(struct e1000_hw * hw){	if (hw->func.mng_enable_host_if)		return hw->func.mng_enable_host_if(hw);	return E1000_NOT_IMPLEMENTED;}/** *  e1000_wait_autoneg - Waits for autonegotiation completion *  @hw: pointer to the HW structure * *  Waits for autoneg to complete. Currently no func pointer exists and all *  implementations are handled in the generic version of this function. **/s32 e1000_wait_autoneg(struct e1000_hw *hw){	if (hw->func.wait_autoneg)		return hw->func.wait_autoneg(hw);	return E1000_SUCCESS;}/** *  e1000_check_reset_block - Verifies PHY can be reset *  @hw: pointer to the HW structure * *  Checks if the PHY is in a state that can be reset or if manageability *  has it tied up. This is a function pointer entry point called by drivers. **/s32 e1000_check_reset_block(struct e1000_hw *hw){	if (hw->func.check_reset_block)		return hw->func.check_reset_block(hw);	return E1000_SUCCESS;}/** *  e1000_read_phy_reg - Reads PHY register *  @hw: pointer to the HW structure *  @offset: the register to read *  @data: the buffer to store the 16-bit read. * *  Reads the PHY register and returns the value in data. *  This is a function pointer entry point called by drivers. **/s32 e1000_read_phy_reg(struct e1000_hw *hw, u32 offset, u16 *data){	if (hw->func.read_phy_reg)		return hw->func.read_phy_reg(hw, offset, data);	return E1000_SUCCESS;}/** *  e1000_write_phy_reg - Writes PHY register *  @hw: pointer to the HW structure *  @offset: the register to write *  @data: the value to write. * *  Writes the PHY register at offset with the value in data. *  This is a function pointer entry point called by drivers. **/s32 e1000_write_phy_reg(struct e1000_hw *hw, u32 offset, u16 data){	if (hw->func.write_phy_reg)		return hw->func.write_phy_reg(hw, offset, data);	return E1000_SUCCESS;}/** *  e1000_read_kmrn_reg - Reads register using Kumeran interface *  @hw: pointer to the HW structure *  @offset: the register to read *  @data: the location to store the 16-bit value read. * *  Reads a register out of the Kumeran interface. Currently no func pointer *  exists and all implementations are handled in the generic version of *  this function. **/s32 e1000_read_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 *data){	return e1000_read_kmrn_reg_generic(hw, offset, data);}/** *  e1000_write_kmrn_reg - Writes register using Kumeran interface *  @hw: pointer to the HW structure *  @offset: the register to write *  @data: the value to write. * *  Writes a register to the Kumeran interface. Currently no func pointer *  exists and all implementations are handled in the generic version of *  this function. **/s32 e1000_write_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 data){	return e1000_write_kmrn_reg_generic(hw, offset, data);}/** *  e1000_get_cable_length - Retrieves cable length estimation *  @hw: pointer to the HW structure * *  This function estimates the cable length and stores them in *  hw->phy.min_length and hw->phy.max_length. This is a function pointer *  entry point called by drivers. **/s32 e1000_get_cable_length(struct e1000_hw *hw){	if (hw->func.get_cable_length)		return hw->func.get_cable_length(hw);	return E1000_SUCCESS;}/** *  e1000_get_phy_info - Retrieves PHY information from registers *  @hw: pointer to the HW structure * *  This function gets some information from various PHY registers and *  populates hw->phy values with it. This is a function pointer entry *  point called by drivers. **/s32 e1000_get_phy_info(struct e1000_hw *hw){	if (hw->func.get_phy_info)		return hw->func.get_phy_info(hw);	return E1000_SUCCESS;}/** *  e1000_phy_hw_reset - Hard PHY reset *  @hw: pointer to the HW structure * *  Performs a hard PHY reset. This is a function pointer entry point called *  by drivers. **/s32 e1000_phy_hw_reset(struct e1000_hw *hw){	if (hw->func.reset_phy)		return hw->func.reset_phy(hw);	return E1000_SUCCESS;}/** *  e1000_phy_commit - Soft PHY reset *  @hw: pointer to the HW structure * *  Performs a soft PHY reset on those that apply. This is a function pointer *  entry point called by drivers. **/s32 e1000_phy_commit(struct e1000_hw *hw){	if (hw->func.commit_phy)		return hw->func.commit_phy(hw);	return E1000_SUCCESS;}/** *  e1000_set_d3_lplu_state - Sets low power link up state for D0 *  @hw: pointer to the HW structure *  @active: 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 D0 *  and SmartSpeed is disabled when active is true, else clear lplu for D0 *  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.  This is a function pointer entry point called by drivers. **/s32 e1000_set_d0_lplu_state(struct e1000_hw *hw, bool active){	if (hw->func.set_d0_lplu_state)		return hw->func.set_d0_lplu_state(hw, active);	return E1000_SUCCESS;}/** *  e1000_set_d3_lplu_state - Sets low power link up state for D3 *  @hw: pointer to the HW structure *  @active: 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.  This is a function pointer entry point called by drivers. **/s32 e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active){	if (hw->func.set_d3_lplu_state)		return hw->func.set_d3_lplu_state(hw, active);	return E1000_SUCCESS;}/** *  e1000_read_mac_addr - Reads MAC address *  @hw: pointer to the HW structure * *  Reads the MAC address out of the adapter and stores it in the HW structure. *  Currently no func pointer exists and all implementations are handled in the *  generic version of this function. **/s32 e1000_read_mac_addr(struct e1000_hw *hw){	if (hw->func.read_mac_addr)		return hw->func.read_mac_addr(hw);	return e1000_read_mac_addr_generic(hw);}/** *  e1000_read_pba_num - Read device part number *  @hw: pointer to the HW structure *  @pba_num: pointer to device part number * *  Reads the product board assembly (PBA) number from the EEPROM and stores *  the value in pba_num. *  Currently no func pointer exists and all implementations are handled in the *  generic version of this function. **/s32 e1000_read_pba_num(struct e1000_hw *hw, u32 *pba_num){	return e1000_read_pba_num_generic(hw, pba_num);}/** *  e1000_validate_nvm_checksum - Verifies NVM (EEPROM) checksum *  @hw: pointer to the HW structure * *  Validates the NVM checksum is correct. This is a function pointer entry *  point called by drivers. **/s32 e1000_validate_nvm_checksum(struct e1000_hw *hw){	if (hw->func.validate_nvm)		return hw->func.validate_nvm(hw);	return -E1000_ERR_CONFIG;}/** *  e1000_update_nvm_checksum - Updates NVM (EEPROM) checksum *  @hw: pointer to the HW structure * *  Updates the NVM checksum. Currently no func pointer exists and all *  implementations are handled in the generic version of this function. **/s32 e1000_update_nvm_checksum(struct e1000_hw *hw){	if (hw->func.update_nvm)		return hw->func.update_nvm(hw);	return -E1000_ERR_CONFIG;}/** *  e1000_reload_nvm - Reloads EEPROM *  @hw: pointer to the HW structure * *  Reloads the EEPROM by setting the "Reinitialize from EEPROM" bit in the *  extended control register. **/void e1000_reload_nvm(struct e1000_hw *hw){	if (hw->func.reload_nvm)		hw->func.reload_nvm(hw);}/** *  e1000_read_nvm - Reads NVM (EEPROM) *  @hw: pointer to the HW structure *  @offset: the word offset to read *  @words: number of 16-bit words to read *  @data: pointer to the properly sized buffer for the data. * *  Reads 16-bit chunks of data from the NVM (EEPROM). This is a function *  pointer entry point called by drivers. **/s32 e1000_read_nvm(struct e1000_hw *hw, u16 offset, u16 words, u16 *data){	if (hw->func.read_nvm)		return hw->func.read_nvm(hw, offset, words, data);	return -E1000_ERR_CONFIG;}/** *  e1000_write_nvm - Writes to NVM (EEPROM) *  @hw: pointer to the HW structure *  @offset: the word offset to read *  @words: number of 16-bit words to write *  @data: pointer to the properly sized buffer for the data. * *  Writes 16-bit chunks of data to the NVM (EEPROM). This is a function *  pointer entry point called by drivers. **/s32 e1000_write_nvm(struct e1000_hw *hw, u16 offset, u16 words, u16 *data){	if (hw->func.write_nvm)		return hw->func.write_nvm(hw, offset, words, data);	return E1000_SUCCESS;}/** *  e1000_write_8bit_ctrl_reg - Writes 8bit Control register *  @hw: pointer to the HW structure *  @reg: 32bit register offset *  @offset: the register to write *  @data: the value to write. * *  Writes the PHY register at offset with the value in data. *  This is a function pointer entry point called by drivers. **/s32 e1000_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg, u32 offset,                              u8 data){	return e1000_write_8bit_ctrl_reg_generic(hw, reg, offset, data);}/** * e1000_power_up_phy - Restores link in case of PHY power down * @hw: pointer to the HW structure * * The phy may be powered down to save power, to turn off link when the * driver is unloaded, or wake on lan is not enabled (among others). **/void e1000_power_up_phy(struct e1000_hw *hw){	if (hw->func.power_up_phy)		hw->func.power_up_phy(hw);	e1000_setup_link(hw);}/** * e1000_power_down_phy - Power down PHY * @hw: pointer to the HW structure * * The phy may be powered down to save power, to turn off link when the * driver is unloaded, or wake on lan is not enabled (among others). **/void e1000_power_down_phy(struct e1000_hw *hw){	if (hw->func.power_down_phy)		hw->func.power_down_phy(hw);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -