igc: Remove phy->type checking

backport from 47bca7de6a

Signed-off-by: Jim Ma <majinjing3@gmail.com>
This commit is contained in:
Jim Ma 2022-11-16 13:20:07 +00:00
parent 3dff3bb13d
commit 16d3d2cf00

View File

@ -4142,17 +4142,10 @@ bool igc_has_link(struct igc_adapter *adapter)
* false until the igc_check_for_link establishes link * false until the igc_check_for_link establishes link
* for copper adapters ONLY * for copper adapters ONLY
*/ */
switch (hw->phy.media_type) { if (!hw->mac.get_link_status)
case igc_media_type_copper: return true;
if (!hw->mac.get_link_status) hw->mac.ops.check_for_link(hw);
return true; link_active = !hw->mac.get_link_status;
hw->mac.ops.check_for_link(hw);
link_active = !hw->mac.get_link_status;
break;
default:
case igc_media_type_unknown:
break;
}
if (hw->mac.type == igc_i225 && if (hw->mac.type == igc_i225 &&
hw->phy.id == I225_I_PHY_ID) { hw->phy.id == I225_I_PHY_ID) {