src/dpdk/drivers/net/e1000/base/e1000_82575.c
s32 e1000_get_eee_status_i354(struct e1000_hw *hw, bool *status)
{
	struct e1000_phy_info *phy = &hw->phy;
	s32 ret_val = E1000_SUCCESS;
	u16 phy_data;

	DEBUGFUNC("e1000_get_eee_status_i354");

	/* Check if EEE is supported on this device. */
	if ((hw->phy.media_type != e1000_media_type_copper) ||
	    ((phy->id != M88E1543_E_PHY_ID) &&
	    (phy->id != M88E1512_E_PHY_ID)))
		goto out;

	ret_val = e1000_read_xmdio_reg(hw, E1000_PCS_STATUS_ADDR_I354,
				       E1000_PCS_STATUS_DEV_I354,
				       &phy_data);
	if (ret_val)
		goto out;

	*status = phy_data & (E1000_PCS_STATUS_TX_LPI_RCVD |
			      E1000_PCS_STATUS_RX_LPI_RCVD) ? true : false;

out:
	return ret_val;
}
/**
 *  e1000_get_eee_status_i354 - Get EEE status
 *  @hw: pointer to the HW structure
 *  @status: EEE status
 *
 *  Get EEE status by guessing based on whether Tx or Rx LPI indications have
 *  been received.
 **/
Get EEE status
@hw: pointer to the HW structure
@status: EEE status

Get EEE status by guessing based on whether Tx or Rx LPI indications have
been received.
Get EEE status @hw : pointer to the HW structure @status : EEE status Get EEE status by guessing based on whether Tx or Rx LPI indications have been received .
s32 e1000_get_eee_status_i354(struct e1000_hw *hw, bool *status)
{
	struct e1000_phy_info *phy = &hw->phy;
	s32 ret_val = E1000_SUCCESS;
	u16 phy_data;
	DEBUGFUNC("e1000_get_eee_status_i354");
	if ((hw->phy.media_type != e1000_media_type_copper) ||
	    ((phy->id != M88E1543_E_PHY_ID) &&
	    (phy->id != M88E1512_E_PHY_ID)))
		goto out;
	ret_val = e1000_read_xmdio_reg(hw, E1000_PCS_STATUS_ADDR_I354,
				       E1000_PCS_STATUS_DEV_I354,
				       &phy_data);
	if (ret_val)
		goto out;
	*status = phy_data & (E1000_PCS_STATUS_TX_LPI_RCVD |
			      E1000_PCS_STATUS_RX_LPI_RCVD) ? true : false;
out:
	return ret_val;
}
s32 e1000_get_eee_status_i354 ( struct e1000_hw * hw , bool * status ) { struct e1000_phy_info * phy = & hw -> phy ; s32 ret_val = E1000_SUCCESS ; u16 phy_data ; DEBUGFUNC ( " " ) ; if ( ( hw -> phy . media_type != e1000_media_type_copper ) || ( ( phy -> id != M88E1543_E_PHY_ID ) && ( phy -> id != M88E1512_E_PHY_ID ) ) ) goto out ; ret_val = e1000_read_xmdio_reg ( hw , E1000_PCS_STATUS_ADDR_I354 , E1000_PCS_STATUS_DEV_I354 , & phy_data ) ; if ( ret_val ) goto out ; * status = phy_data & ( E1000_PCS_STATUS_TX_LPI_RCVD | E1000_PCS_STATUS_RX_LPI_RCVD ) ? true : false ; out : return ret_val ; }
e1000_get_eee_status_i354 - Get EEE status
  @hw: pointer to the HW structure
  @status: EEE status
e1000_get_eee_status_i354 - Get EEE status @hw : pointer to the HW structure @status : EEE status
/* Check if EEE is supported on this device. */