summaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2010-05-18 11:32:53 +0000
committerDavid S. Miller <davem@davemloft.net>2010-05-18 15:16:44 -0700
commit48f753d2ba94a4081400fa8d26bdbfbbf12b10de (patch)
tree1b4bf9472d89cee9a517e154a4af59f7b78214c7 /drivers/net/cnic.h
parent1f1332a3cb7ac73e3bcff6ea42ff965c90a29d12 (diff)
downloadlinux-48f753d2ba94a4081400fa8d26bdbfbbf12b10de.tar.gz
linux-48f753d2ba94a4081400fa8d26bdbfbbf12b10de.tar.bz2
linux-48f753d2ba94a4081400fa8d26bdbfbbf12b10de.zip
cnic: Return SPQ credit to bnx2x after ring setup and shutdown.
Everytime the iSCSI ring finishes setup or shutdown, we need to return the SPQ (slow path queue) credit to the bnx2x driver. Without this step, the SPQ will eventually be full causing iSCSI to fail. This can happen after 3 or 4 MTU changes for example. Add code to wait for these slow path commands to complete in the RX ring and return the SPQ credit to bnx2x. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic.h')
-rw-r--r--drivers/net/cnic.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h
index 4422497249d1..08b1235d987d 100644
--- a/drivers/net/cnic.h
+++ b/drivers/net/cnic.h
@@ -181,6 +181,7 @@ struct cnic_local {
unsigned long cnic_local_flags;
#define CNIC_LCL_FL_KWQ_INIT 0x0
+#define CNIC_LCL_FL_L2_WAIT 0x1
struct cnic_dev *dev;
@@ -348,6 +349,10 @@ struct bnx2x_bd_chain_next {
#define BNX2X_RCQ_DESC_CNT (BCM_PAGE_SIZE / sizeof(union eth_rx_cqe))
#define BNX2X_MAX_RCQ_DESC_CNT (BNX2X_RCQ_DESC_CNT - 1)
+#define BNX2X_NEXT_RCQE(x) (((x) & BNX2X_MAX_RCQ_DESC_CNT) == \
+ (BNX2X_MAX_RCQ_DESC_CNT - 1)) ? \
+ ((x) + 2) : ((x) + 1)
+
#define BNX2X_DEF_SB_ID 16
#define BNX2X_ISCSI_RX_SB_INDEX_NUM \