aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
authorTakuma Ueba <t.ueba11@gmail.com>2015-12-31 00:58:14 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-02-24 17:56:42 -0500
commitb72f3f72005dfd649d787535bd04ada3b3f1b3ba (patch)
treea37d73261628a48be9f3a5b5973103996e78d3e5 /drivers/net/ethernet/intel/igb/igb_main.c
parent9cd34b3a1cfd47692cbef8cb0761475021883e18 (diff)
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 <t.ueba11@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index af46fcf8a50e..1aa01809bcaa 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4357,6 +4357,7 @@ static void igb_watchdog_task(struct work_struct *work)
4357 u32 link; 4357 u32 link;
4358 int i; 4358 int i;
4359 u32 connsw; 4359 u32 connsw;
4360 u16 phy_data, retry_count = 20;
4360 4361
4361 link = igb_has_link(adapter); 4362 link = igb_has_link(adapter);
4362 4363
@@ -4435,6 +4436,25 @@ static void igb_watchdog_task(struct work_struct *work)
4435 break; 4436 break;
4436 } 4437 }
4437 4438
4439 if (adapter->link_speed != SPEED_1000)
4440 goto no_wait;
4441
4442 /* wait for Remote receiver status OK */
4443retry_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 }
4457no_wait:
4438 netif_carrier_on(netdev); 4458 netif_carrier_on(netdev);
4439 4459
4440 igb_ping_all_vfs(adapter); 4460 igb_ping_all_vfs(adapter);