All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4]bnx2x: Removing the PMF indication when unloading
@ 2008-11-03 16:11 Eilon Greenstein
  2008-11-03 22:07 ` Alex Chiang
  0 siblings, 1 reply; 2+ messages in thread
From: Eilon Greenstein @ 2008-11-03 16:11 UTC (permalink / raw)
  To: David Miller, netdev

When the PMF flag is set, the driver can access the HW freely. When the
driver is unloaded, it should not access the HW. The problem caused fatal
errors when "ethtool -i" was called after the calling instance was unloaded
and another instance was already loaded

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x_main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index fce7451..61152e1 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -6481,6 +6481,7 @@ load_int_disable:
 	bnx2x_free_irq(bp);
 load_error:
 	bnx2x_free_mem(bp);
+	bp->port.pmf = 0;
 
 	/* TBD we really need to reset the chip
 	   if we want to recover from this */
@@ -6791,6 +6792,7 @@ unload_error:
 	/* Report UNLOAD_DONE to MCP */
 	if (!BP_NOMCP(bp))
 		bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE);
+	bp->port.pmf = 0;
 
 	/* Free SKBs, SGEs, TPA pool and driver internals */
 	bnx2x_free_skbs(bp);
-- 
1.5.4.3





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

end of thread, other threads:[~2008-11-03 22:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-03 16:11 [PATCH 1/4]bnx2x: Removing the PMF indication when unloading Eilon Greenstein
2008-11-03 22:07 ` Alex Chiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.