Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291384
b: refs/heads/master
c: 9ce392d
h: refs/heads/master
v: v3
  • Loading branch information
Yuval Mintz authored and David S. Miller committed Mar 13, 2012
1 parent d3b7185 commit 303db2a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 259afa1f725dc7ec1626835b9ac54827a46cdf80
refs/heads/master: 9ce392d4fa43c3abb9ab02a29e225084ed84451e
17 changes: 17 additions & 0 deletions trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2007,6 +2007,15 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
bnx2x_cnic_notify(bp, CNIC_CTL_START_CMD);
#endif

/* mark driver is loaded in shmem2 */
if (SHMEM2_HAS(bp, drv_capabilities_flag)) {
u32 val;
val = SHMEM2_RD(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)]);
SHMEM2_WR(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)],
val | DRV_FLAGS_CAPABILITIES_LOADED_SUPPORTED |
DRV_FLAGS_CAPABILITIES_LOADED_L2);
}

/* Wait for all pending SP commands to complete */
if (!bnx2x_wait_sp_comp(bp, ~0x0UL)) {
BNX2X_ERR("Timeout waiting for SP elements to complete\n");
Expand Down Expand Up @@ -2060,6 +2069,14 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
int i;
bool global = false;

/* mark driver is unloaded in shmem2 */
if (SHMEM2_HAS(bp, drv_capabilities_flag)) {
u32 val;
val = SHMEM2_RD(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)]);
SHMEM2_WR(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)],
val & ~DRV_FLAGS_CAPABILITIES_LOADED_L2);
}

if ((bp->state == BNX2X_STATE_CLOSED) ||
(bp->state == BNX2X_STATE_ERROR)) {
/* We can get here if the driver has been unloaded
Expand Down

0 comments on commit 303db2a

Please sign in to comment.