Patchwork bnx2x: Initialize cnic status block during chip reset

login
register
mail settings
Submitter Eilon Greenstein
Date Dec. 23, 2009, 2:02 p.m.
Message ID <1261576965.15524.42.camel@lb-tlvb-eilong>
Download mbox | patch
Permalink /patch/41667/
State Accepted
Delegated to: David Miller
Headers show

Comments

Eilon Greenstein - Dec. 23, 2009, 2:02 p.m.
From: Michael Chan <mchan@broadcom.com>

When the device is reset during MTU change, ring size change, or self
test, etc, the cnic status block needs to be properly initialized if
cnic is registered.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x_main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
David Miller - Dec. 26, 2009, 1:14 a.m.
From: "Eilon Greenstein" <eilong@broadcom.com>
Date: Wed, 23 Dec 2009 16:02:45 +0200

> From: Michael Chan <mchan@broadcom.com>
> 
> When the device is reset during MTU change, ring size change, or self
> test, etc, the cnic status block needs to be properly initialized if
> cnic is registered.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 77ba135..306c2b8 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -7593,6 +7593,8 @@  static int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
 		if (bp->cnic_eth_dev.drv_state & CNIC_DRV_STATE_REGD) {
 			bnx2x_set_iscsi_eth_mac_addr(bp, 1);
 			bp->cnic_flags |= BNX2X_CNIC_FLAG_MAC_SET;
+			bnx2x_init_sb(bp, bp->cnic_sb, bp->cnic_sb_mapping,
+				      CNIC_SB_ID(bp));
 		}
 		mutex_unlock(&bp->cnic_mutex);
 #endif