From: Konstantin Khorenko <[email protected]>

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 <[email protected]>

(cherry-picked from 377e583f2a8479b238c742a64fa7b31178b26456)
Signed-off-by: Andrey Zhadchenko <[email protected]>

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c 
b/drivers/net/ethernet/intel/igb/igb_main.c
index b46bff8..51b01cc 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -5249,7 +5249,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);
 
@@ -5339,9 +5339,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");
-- 
1.8.3.1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to