netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] bnx2x: Delay during kdump load
@ 2015-04-29  5:09 Yuval Mintz
  2015-04-29 19:50 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Yuval Mintz @ 2015-04-29  5:09 UTC (permalink / raw)
  To: davem, netdev; +Cc: Ariel.Elior, Yuval Mintz

In a kdump environment interfaces might be re-loaded without a proper
unload sequence in the previous running kernel.
bnx2x management FW and driver maintains a `pulse' that notifies the FW
that the driver is still up and running.

Driver load on the kdump kernel should be performed only after the pulse
has been out-of-sync long enough for the management FW to identify that
the driver has crashed, on which point it will perform some necessary
cleanup of the HW.

In today's distros kdump loading is quite fast, sometimes too fast for our
FW to get out-of-sync. This patch delays the bnx2x's probe during kdump
to allow a proper re-load on the kdump kernel.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>

---
Hi Dave,

Please consider applying this to 'net'.

Thanks,
Yuval
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index b9f85fcc..0939279 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -13371,6 +13371,12 @@ static int bnx2x_init_one(struct pci_dev *pdev,
 	bool is_vf;
 	int cnic_cnt;
 
+	/* 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);
+
 	/* An estimated maximum supported CoS number according to the chip
 	 * version.
 	 * We will try to roughly estimate the maximum number of CoSes this chip
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] bnx2x: Delay during kdump load
  2015-04-29  5:09 [PATCH net] bnx2x: Delay during kdump load Yuval Mintz
@ 2015-04-29 19:50 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-04-29 19:50 UTC (permalink / raw)
  To: Yuval.Mintz; +Cc: netdev, Ariel.Elior

From: Yuval Mintz <Yuval.Mintz@qlogic.com>
Date: Wed, 29 Apr 2015 08:09:49 +0300

> In a kdump environment interfaces might be re-loaded without a proper
> unload sequence in the previous running kernel.
> bnx2x management FW and driver maintains a `pulse' that notifies the FW
> that the driver is still up and running.
> 
> Driver load on the kdump kernel should be performed only after the pulse
> has been out-of-sync long enough for the management FW to identify that
> the driver has crashed, on which point it will perform some necessary
> cleanup of the HW.
> 
> In today's distros kdump loading is quite fast, sometimes too fast for our
> FW to get out-of-sync. This patch delays the bnx2x's probe during kdump
> to allow a proper re-load on the kdump kernel.
> 
> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-29 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-29  5:09 [PATCH net] bnx2x: Delay during kdump load Yuval Mintz
2015-04-29 19:50 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).