aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2010-05-18 07:32:53 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-18 18:16:44 -0400
commit48f753d2ba94a4081400fa8d26bdbfbbf12b10de (patch)
tree1b4bf9472d89cee9a517e154a4af59f7b78214c7 /drivers/net/cnic.h
parent1f1332a3cb7ac73e3bcff6ea42ff965c90a29d12 (diff)
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 {
181 181
182 unsigned long cnic_local_flags; 182 unsigned long cnic_local_flags;
183#define CNIC_LCL_FL_KWQ_INIT 0x0 183#define CNIC_LCL_FL_KWQ_INIT 0x0
184#define CNIC_LCL_FL_L2_WAIT 0x1
184 185
185 struct cnic_dev *dev; 186 struct cnic_dev *dev;
186 187
@@ -348,6 +349,10 @@ struct bnx2x_bd_chain_next {
348#define BNX2X_RCQ_DESC_CNT (BCM_PAGE_SIZE / sizeof(union eth_rx_cqe)) 349#define BNX2X_RCQ_DESC_CNT (BCM_PAGE_SIZE / sizeof(union eth_rx_cqe))
349#define BNX2X_MAX_RCQ_DESC_CNT (BNX2X_RCQ_DESC_CNT - 1) 350#define BNX2X_MAX_RCQ_DESC_CNT (BNX2X_RCQ_DESC_CNT - 1)
350 351
352#define BNX2X_NEXT_RCQE(x) (((x) & BNX2X_MAX_RCQ_DESC_CNT) == \
353 (BNX2X_MAX_RCQ_DESC_CNT - 1)) ? \
354 ((x) + 2) : ((x) + 1)
355
351#define BNX2X_DEF_SB_ID 16 356#define BNX2X_DEF_SB_ID 16
352 357
353#define BNX2X_ISCSI_RX_SB_INDEX_NUM \ 358#define BNX2X_ISCSI_RX_SB_INDEX_NUM \