aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-05-07 14:37:10 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-10 19:23:22 -0400
commitcd9c39977754d9602b5783a44f4af09530a58254 (patch)
treec9fa6726361889365189a09295408d42dccebac3 /drivers/net/ethernet
parent0b59d8806a31bb0267b3a461e8fef20c727bdbf6 (diff)
bnx2x: limit fw delay in kdump to 5s after boot
Commit 12a8541d5c82 "bnx2x: Delay during kdump load" added a 5 seconds delay to bnx2x's probe function in the kdump case to let the firmware realize the old driver is gone. The problem with the delay is that it is per-device, so if you have several bnx2x NICs in NPAR mode, the delays can accumulate to minutes. Fix it by adjusting the delay so that we do not wait more than necessary, i.e. no more delaying after 5 seconds of kernel boot time. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 556dcc162a62..fd52ce95127e 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -13371,8 +13371,13 @@ static int bnx2x_init_one(struct pci_dev *pdev,
13371 /* Management FW 'remembers' living interfaces. Allow it some time 13371 /* Management FW 'remembers' living interfaces. Allow it some time
13372 * to forget previously living interfaces, allowing a proper re-load. 13372 * to forget previously living interfaces, allowing a proper re-load.
13373 */ 13373 */
13374 if (is_kdump_kernel()) 13374 if (is_kdump_kernel()) {
13375 msleep(5000); 13375 ktime_t now = ktime_get_boottime();
13376 ktime_t fw_ready_time = ktime_set(5, 0);
13377
13378 if (ktime_before(now, fw_ready_time))
13379 msleep(ktime_ms_delta(fw_ready_time, now));
13380 }
13376 13381
13377 /* An estimated maximum supported CoS number according to the chip 13382 /* An estimated maximum supported CoS number according to the chip
13378 * version. 13383 * version.