Skip to contentSkip to conversation

cnic: Send delete command when shutting down iSCSI ring.

PATCH Applied Michael Chan 2 participants 4 messages Dec 11, 2009

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

PATCH 1/2 cnic: Send delete command when shutting down iSCSI ring.

This step is necessary on the bnx2x devices when restarting the iSCSI ring. Without it, the firmware can assert and cause bnx2x to report errors.

---
 drivers/net/cnic.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/net/cnic.c +6 -0
index d4c6e7f..a2c3328 100644
@@ -4183,6 +4183,12 @@ static void cnic_shutdown_rings(struct cnic_dev *dev)
 		cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_ETH_HALT,
 			BNX2X_ISCSI_L2_CID, ETH_CONNECTION_TYPE, &l5_data);
 		msleep(10);
+
+		memset(&l5_data, 0, sizeof(l5_data));
+		cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_ETH_CFC_DEL,
+			BNX2X_ISCSI_L2_CID, ETH_CONNECTION_TYPE |
+			(1 << SPE_HDR_COMMON_RAMROD_SHIFT), &l5_data);
+		msleep(10);
 	}
 }
 
Signature · 1 line
1.6.4.GIT
#1 lore raw

PATCH 2/2 cnic: Zero out status block and Event Queue indices.

To prevent stale indices from causing spurious events when restarting the bnx2x devices.

---
 drivers/net/cnic.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/cnic.c +5 -0
index a2c3328..4332b3a 100644
@@ -1104,6 +1104,8 @@ static int cnic_alloc_bnx2x_resc(struct cnic_dev *dev)
 	cp->bnx2x_status_blk = cp->status_blk;
 	cp->bnx2x_def_status_blk = cp->ethdev->irq_arr[1].status_blk;
 
+	memset(cp->bnx2x_status_blk, 0, sizeof(struct host_status_block));
+
 	cp->l2_rx_ring_size = 15;
 
 	ret = cnic_alloc_l2_rings(dev, 4);
@@ -4295,6 +4297,9 @@ static void cnic_stop_bnx2x_hw(struct cnic_dev *dev)
 		  offsetof(struct cstorm_status_block_c,
 			   index_values[HC_INDEX_C_ISCSI_EQ_CONS]),
 		  0);
+	CNIC_WR(dev, BAR_CSTRORM_INTMEM +
+		CSTORM_ISCSI_EQ_CONS_OFFSET(cp->func, 0), 0);
+	CNIC_WR16(dev, cp->kcq_io_addr, 0);
 	cnic_free_resc(dev);
 }
 
Signature · 1 line
1.6.4.GIT
maintainer Applied
#2 lore raw

Re: [PATCH 2/2] cnic: Zero out status block and Event Queue indices.

From: "Michael Chan" <[email protected]>
Date: Thu, 10 Dec 2009 17:40:58 -0800

Quoted 4 lines

To prevent stale indices from causing spurious events when restarting the bnx2x devices.

Applied.