Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130116
b: refs/heads/master
c: b466173
h: refs/heads/master
v: v3
  • Loading branch information
Eilon Greenstein authored and David S. Miller committed Jan 20, 2009
1 parent 6a5f4ad commit 5a46833
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 693fc0d14334859430733ab902adac182fdd8153
refs/heads/master: b4661739c67acd15a02f8e112f8cc52d24b609ed
14 changes: 9 additions & 5 deletions trunk/drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6874,17 +6874,16 @@ static void __devinit bnx2x_undi_unload(struct bnx2x *bp)
*/
bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_UNDI);
val = REG_RD(bp, DORQ_REG_NORM_CID_OFST);
if (val == 0x7)
REG_WR(bp, DORQ_REG_NORM_CID_OFST, 0);
bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_UNDI);

if (val == 0x7) {
u32 reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS;
/* save our func */
int func = BP_FUNC(bp);
u32 swap_en;
u32 swap_val;

/* clear the UNDI indication */
REG_WR(bp, DORQ_REG_NORM_CID_OFST, 0);

BNX2X_DEV_INFO("UNDI is active! reset device\n");

/* try unload UNDI on port 0 */
Expand All @@ -6910,6 +6909,9 @@ static void __devinit bnx2x_undi_unload(struct bnx2x *bp)
bnx2x_fw_command(bp, reset_code);
}

/* now it's safe to release the lock */
bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_UNDI);

REG_WR(bp, (BP_PORT(bp) ? HC_REG_CONFIG_1 :
HC_REG_CONFIG_0), 0x1000);

Expand Down Expand Up @@ -6954,7 +6956,9 @@ static void __devinit bnx2x_undi_unload(struct bnx2x *bp)
bp->fw_seq =
(SHMEM_RD(bp, func_mb[bp->func].drv_mb_header) &
DRV_MSG_SEQ_NUMBER_MASK);
}

} else
bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_UNDI);
}
}

Expand Down

0 comments on commit 5a46833

Please sign in to comment.