提交 cd9c3997 编写于 作者: M Michal Schmidt 提交者: David S. Miller

bnx2x: limit fw delay in kdump to 5s after boot

Commit 12a8541d "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: NMichal Schmidt <mschmidt@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0b59d880
......@@ -13371,8 +13371,13 @@ static int bnx2x_init_one(struct pci_dev *pdev,
/* Management FW 'remembers' living interfaces. Allow it some time
* to forget previously living interfaces, allowing a proper re-load.
*/
if (is_kdump_kernel())
msleep(5000);
if (is_kdump_kernel()) {
ktime_t now = ktime_get_boottime();
ktime_t fw_ready_time = ktime_set(5, 0);
if (ktime_before(now, fw_ready_time))
msleep(ktime_ms_delta(fw_ready_time, now));
}
/* An estimated maximum supported CoS number according to the chip
* version.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册