[RHEL7,COMMIT] drivers/igb: increase link detection timeout up to 10 sec

Submitted by Konstantin Khorenko on June 3, 2019, 1:21 p.m.

Details

Message ID 201906031321.x53DLp3Z015365@finist-ce7.sw.ru
State New
Series "drivers/igb: increase link detection timeout up to 10 sec"
Headers show

Commit Message

Konstantin Khorenko June 3, 2019, 1:21 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.12.2.vz7.96.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.12.2.vz7.96.12
------>
commit 99dc5755f20e501ff289d60e8a92ecbd3431ba4d
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date:   Mon Jun 3 15:56:31 2019 +0300

    drivers/igb: increase link detection timeout up to 10 sec
    
    5 second timeout appeared not enough and Intel igb network cards
    sometomes require more time to detect the link.
    
    So, let's increase the timeout up to 10 seconds and
    produce a WARNING in case 10 seconds is not enough as well.
    
    Fixes: dc01dda30fd0 ("drivers/igb: increase link detection timeout up to
    5 sec")
    
    https://jira.sw.ru/browse/PSBM-95074
    https://pmc.acronis.com/browse/VSTOR-14627
    
    Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 91513eb5a416..bc87c48c3443 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -5162,7 +5162,7 @@  static void igb_watchdog_task(struct work_struct *work)
 	u32 link;
 	int i;
 	u32 connsw;
-	u16 phy_data, retry_count = 50;
+	u16 phy_data, retry_count = 100;
 
 	link = igb_has_link(adapter);
 
@@ -5252,11 +5252,10 @@  static void igb_watchdog_task(struct work_struct *work)
 				    retry_count) {
 					msleep(100);
 					retry_count--;
-					WARN_ONCE(retry_count < 30,
-						  "igb timeout exceed 2 seconds");
 					goto retry_read_status;
 				} else if (!retry_count) {
-					dev_err(&adapter->pdev->dev, "exceed max 5 second\n");
+					dev_err(&adapter->pdev->dev, "exceed max 10 second\n");
+					WARN_ONCE(1, "igb timeout exceed 10 seconds");
 				}
 			} else {
 				dev_err(&adapter->pdev->dev, "read 1000Base-T Status Reg\n");