Skip to content

Commit

Permalink
bnx2x: Removing the PMF indication when unloading
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eilon Greenstein authored and David S. Miller committed Nov 4, 2008
1 parent ee04448 commit 9a03544
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6481,6 +6481,7 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
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 */
Expand Down Expand Up @@ -6791,6 +6792,7 @@ static int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
/* 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);
Expand Down

0 comments on commit 9a03544

Please sign in to comment.