summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2008-11-03 16:45:55 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-11-20 14:54:43 -0800
commit365ef014724ec99fa6aee6bad8b66f352e2ab711 (patch)
treedad1b6636f7b69bf676c321ff137150471239a5a
parent96e1cb2535bff4fad43471d95fa2ae5d68fac673 (diff)
bnx2x: Removing the PMF indication when unloading
commit 9a0354405feb0f8bd460349a93db05e4cca8d166 upstream. 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> Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Alex Chiang <achiang@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/net/bnx2x_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index a8eb3c4a47c8..8f44680b7205 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -6480,6 +6480,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 */
@@ -6790,6 +6791,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);