[Devel] [PATCH RHEL7 COMMIT] drivers/igb: increase link detection timeout up to 5 sec

Konstantin Khorenko khorenko at virtuozzo.com
Tue Feb 26 12:43:51 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.1.3.vz7.83.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.1.3.vz7.83.14
------>
commit 377e583f2a8479b238c742a64fa7b31178b26456
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Tue Feb 26 12:25:47 2019 +0300

    drivers/igb: increase link detection timeout up to 5 sec
    
    We hit again and again the situation when Intel igb network cards
    detection takes 3 seconds while timeout is set to 2 seconds.
    
    Let's increase the timeout up to 5 seconds.
    
    https://pmc.acronis.com/browse/VSTOR-14627
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index de419e744e50..91513eb5a416 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 = 20;
+	u16 phy_data, retry_count = 50;
 
 	link = igb_has_link(adapter);
 
@@ -5252,9 +5252,11 @@ 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 2 second\n");
+					dev_err(&adapter->pdev->dev, "exceed max 5 second\n");
 				}
 			} else {
 				dev_err(&adapter->pdev->dev, "read 1000Base-T Status Reg\n");



More information about the Devel mailing list