/* Polarity is determined based on the PHY specific status register.  */
s32 e1000_check_polarity_82577(struct e1000_hw *hw)
/* Polarity is determined based on the PHY specific status register.  */
s32 e1000_check_polarity_82577(struct e1000_hw *hw)
{
	struct e1000_phy_info *phy = &hw->phy;
	s32 ret_val;
	u16 data;
	ret_val = phy->ops.read_reg(hw, I82577_PHY_STATUS_2, &data);
	if (!ret_val)
		phy->cable_polarity = (data & I82577_PHY_STATUS2_REV_POLARITY)
		                      ? e1000_rev_polarity_reversed
		                      : e1000_rev_polarity_normal;
	return ret_val;
}