Skip to content

Commit b72f3f7

Browse files
t-uebaJeff Kirsher
authored andcommitted
igb: When GbE link up, wait for Remote receiver status condition
I210 device IPv6 autoconf test sometimes fails, because DAD NS for link-local is not transmitted. This packet is silently dropped. This problem is seen only GbE environment. igb_watchdog_task link up detection continues to the following process. The following cases are observed: 1.PHY 1000BASE-T Status Register Remote receiver status bit is NG. (NG status becomes OK after about 200 - 700ms) 2.In this case, the transfer packet is silently dropped. 1000BASE-T Status register [Expected]: 0x3800 or 0x7800 [problem occurred]: 0x2800 or 0x6800 Frequency of occurrence: approx 1/10 - 1/40 observed In order to avoid this problem, wait until 1000BASE-T Status register "Remote receiver status OK" After applying this patch, at least 400 runs succeed with no problems. Signed-off-by: Takuma Ueba <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 9cd34b3 commit b72f3f7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4357,6 +4357,7 @@ static void igb_watchdog_task(struct work_struct *work)
43574357
u32 link;
43584358
int i;
43594359
u32 connsw;
4360+
u16 phy_data, retry_count = 20;
43604361

43614362
link = igb_has_link(adapter);
43624363

@@ -4435,6 +4436,25 @@ static void igb_watchdog_task(struct work_struct *work)
44354436
break;
44364437
}
44374438

4439+
if (adapter->link_speed != SPEED_1000)
4440+
goto no_wait;
4441+
4442+
/* wait for Remote receiver status OK */
4443+
retry_read_status:
4444+
if (!igb_read_phy_reg(hw, PHY_1000T_STATUS,
4445+
&phy_data)) {
4446+
if (!(phy_data & SR_1000T_REMOTE_RX_STATUS) &&
4447+
retry_count) {
4448+
msleep(100);
4449+
retry_count--;
4450+
goto retry_read_status;
4451+
} else if (!retry_count) {
4452+
dev_err(&adapter->pdev->dev, "exceed max 2 second\n");
4453+
}
4454+
} else {
4455+
dev_err(&adapter->pdev->dev, "read 1000Base-T Status Reg\n");
4456+
}
4457+
no_wait:
44384458
netif_carrier_on(netdev);
44394459

44404460
igb_ping_all_vfs(adapter);

0 commit comments

Comments
 (0)