|
@@ -4357,6 +4357,7 @@ static void igb_watchdog_task(struct work_struct *work)
|
|
|
u32 link;
|
|
|
int i;
|
|
|
u32 connsw;
|
|
|
+ u16 phy_data, retry_count = 20;
|
|
|
|
|
|
link = igb_has_link(adapter);
|
|
|
|
|
@@ -4435,6 +4436,25 @@ static void igb_watchdog_task(struct work_struct *work)
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
+ if (adapter->link_speed != SPEED_1000)
|
|
|
+ goto no_wait;
|
|
|
+
|
|
|
+ /* wait for Remote receiver status OK */
|
|
|
+retry_read_status:
|
|
|
+ if (!igb_read_phy_reg(hw, PHY_1000T_STATUS,
|
|
|
+ &phy_data)) {
|
|
|
+ if (!(phy_data & SR_1000T_REMOTE_RX_STATUS) &&
|
|
|
+ retry_count) {
|
|
|
+ msleep(100);
|
|
|
+ retry_count--;
|
|
|
+ goto retry_read_status;
|
|
|
+ } else if (!retry_count) {
|
|
|
+ dev_err(&adapter->pdev->dev, "exceed max 2 second\n");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ dev_err(&adapter->pdev->dev, "read 1000Base-T Status Reg\n");
|
|
|
+ }
|
|
|
+no_wait:
|
|
|
netif_carrier_on(netdev);
|
|
|
|
|
|
igb_ping_all_vfs(adapter);
|