Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e9c4fd3 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller
Browse files

cnic: Zero out status block and Event Queue indices.



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

Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1bcdc32c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -1104,6 +1104,8 @@ static int cnic_alloc_bnx2x_resc(struct cnic_dev *dev)
	cp->bnx2x_status_blk = cp->status_blk;
	cp->bnx2x_status_blk = cp->status_blk;
	cp->bnx2x_def_status_blk = cp->ethdev->irq_arr[1].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;
	cp->l2_rx_ring_size = 15;


	ret = cnic_alloc_l2_rings(dev, 4);
	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,
		  offsetof(struct cstorm_status_block_c,
			   index_values[HC_INDEX_C_ISCSI_EQ_CONS]),
			   index_values[HC_INDEX_C_ISCSI_EQ_CONS]),
		  0);
		  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);
	cnic_free_resc(dev);
}
}