static s32 igb_check_for_link_82575(struct e1000_hw *hw) { s32 ret_val; u16 speed, duplex; if (hw->phy.media_type != e1000_media_type_copper) { ret_val = igb_get_pcs_speed_and_duplex_82575(hw, &speed, &duplex); hw->mac.get_link_status = !hw->mac.serdes_has_link; } else { ret_val = igb_check_for_copper_link(hw); } return ret_val; }
/** * igb_check_for_link_82575 - Check for link * @hw: pointer to the HW structure * * If sgmii is enabled, then use the pcs register to determine link, otherwise * use the generic interface for determining link. **/ static s32 igb_check_for_link_82575(struct e1000_hw *hw) { s32 ret_val; u16 speed, duplex; if (hw->phy.media_type != e1000_media_type_copper) { ret_val = igb_get_pcs_speed_and_duplex_82575(hw, &speed, &duplex); /* * Use this flag to determine if link needs to be checked or * not. If we have link clear the flag so that we do not * continue to check for link. */ hw->mac.get_link_status = !hw->mac.serdes_has_link; } else { ret_val = igb_check_for_copper_link(hw); } return ret_val; }