Skip to contentSkip to conversation

bnx2x: Fix AER semaphore release

PATCH Applied Yuval Mintz 2 participants 2 messages Mar 27, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bnx2x: Fix AER semaphore release

Commit 7fa6f34 "AER revised" erroneously inserted an error-flow in which a semaphore is released even though the attempt to take it has failed.

---
Hi Dave,

Please accept this to `net-next'.

Thanks,
Yuval

---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +1 -1
index 2c6a2a6..5c5a327 100644
@@ -10070,8 +10070,8 @@ static int bnx2x_prev_unload(struct bnx2x *bp)
 			/* If Path is marked by EEH, ignore unload status */
 			aer = !!(bnx2x_prev_path_get_entry(bp) &&
 				 bnx2x_prev_path_get_entry(bp)->aer);
+			up(&bnx2x_prev_sem);
 		}
-		up(&bnx2x_prev_sem);
 
 		if (fw == FW_MSG_CODE_DRV_UNLOAD_COMMON || aer) {
 			rc = bnx2x_prev_unload_common(bp);
Signature · 1 line
1.8.1.227.g44fe835