|
@@ -139,10 +139,6 @@ static s32 igb_check_for_link_media_swap(struct e1000_hw *hw)
|
|
|
if (ret_val)
|
|
|
return ret_val;
|
|
|
|
|
|
- /* reset page to 0 */
|
|
|
- ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
|
|
|
- if (ret_val)
|
|
|
- return ret_val;
|
|
|
|
|
|
if (data & E1000_M88E1112_STATUS_LINK)
|
|
|
port = E1000_MEDIA_PORT_OTHER;
|
|
@@ -151,8 +147,20 @@ static s32 igb_check_for_link_media_swap(struct e1000_hw *hw)
|
|
|
if (port && (hw->dev_spec._82575.media_port != port)) {
|
|
|
hw->dev_spec._82575.media_port = port;
|
|
|
hw->dev_spec._82575.media_changed = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (port == E1000_MEDIA_PORT_COPPER) {
|
|
|
+ /* reset page to 0 */
|
|
|
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
|
|
|
+ if (ret_val)
|
|
|
+ return ret_val;
|
|
|
+ igb_check_for_link_82575(hw);
|
|
|
} else {
|
|
|
- ret_val = igb_check_for_link_82575(hw);
|
|
|
+ igb_check_for_link_82575(hw);
|
|
|
+ /* reset page to 0 */
|
|
|
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
|
|
|
+ if (ret_val)
|
|
|
+ return ret_val;
|
|
|
}
|
|
|
|
|
|
return 0;
|