diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2010-10-05 23:23:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-06 17:10:35 -0400 |
commit | 523224a3b3cd407ce4e6731a087194e13a90db18 (patch) | |
tree | bb0fda289682e4259c401b8a5763ba4cc4d41659 /drivers/net/cnic.h | |
parent | 0c5b77152e736d23a23eb2546eab323e27a37f52 (diff) |
bnx2x, cnic, bnx2i: use new FW/HSI
This is the new FW HSI blob and the relevant definitions without logic changes.
It also included code adaptation for new HSI. New features are not enabled.
New FW/HSI includes:
- Support for 57712 HW
- Future support for VF (not used)
- Improvements in FW interrupts scheme
- FW FCoE hooks (stubs for future usage)
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic.h')
-rw-r--r-- | drivers/net/cnic.h | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h index 481618399b1f..676d008509c6 100644 --- a/drivers/net/cnic.h +++ b/drivers/net/cnic.h | |||
@@ -12,6 +12,13 @@ | |||
12 | #ifndef CNIC_H | 12 | #ifndef CNIC_H |
13 | #define CNIC_H | 13 | #define CNIC_H |
14 | 14 | ||
15 | #define HC_INDEX_ISCSI_EQ_CONS 6 | ||
16 | |||
17 | #define HC_INDEX_FCOE_EQ_CONS 3 | ||
18 | |||
19 | #define HC_SP_INDEX_ETH_ISCSI_CQ_CONS 5 | ||
20 | #define HC_SP_INDEX_ETH_ISCSI_RX_CQ_CONS 1 | ||
21 | |||
15 | #define KWQ_PAGE_CNT 4 | 22 | #define KWQ_PAGE_CNT 4 |
16 | #define KCQ_PAGE_CNT 16 | 23 | #define KCQ_PAGE_CNT 16 |
17 | 24 | ||
@@ -179,6 +186,14 @@ struct kcq_info { | |||
179 | u32 io_addr; | 186 | u32 io_addr; |
180 | }; | 187 | }; |
181 | 188 | ||
189 | struct iro { | ||
190 | u32 base; | ||
191 | u16 m1; | ||
192 | u16 m2; | ||
193 | u16 m3; | ||
194 | u16 size; | ||
195 | }; | ||
196 | |||
182 | struct cnic_local { | 197 | struct cnic_local { |
183 | 198 | ||
184 | spinlock_t cnic_ulp_lock; | 199 | spinlock_t cnic_ulp_lock; |
@@ -213,6 +228,9 @@ struct cnic_local { | |||
213 | u16 rx_cons; | 228 | u16 rx_cons; |
214 | u16 tx_cons; | 229 | u16 tx_cons; |
215 | 230 | ||
231 | struct iro *iro_arr; | ||
232 | #define IRO (((struct cnic_local *) dev->cnic_priv)->iro_arr) | ||
233 | |||
216 | struct cnic_dma kwq_info; | 234 | struct cnic_dma kwq_info; |
217 | struct kwqe **kwq; | 235 | struct kwqe **kwq; |
218 | 236 | ||
@@ -231,12 +249,16 @@ struct cnic_local { | |||
231 | union { | 249 | union { |
232 | void *gen; | 250 | void *gen; |
233 | struct status_block_msix *bnx2; | 251 | struct status_block_msix *bnx2; |
234 | struct host_status_block *bnx2x; | 252 | struct host_hc_status_block_e1x *bnx2x_e1x; |
253 | /* index values - which counter to update */ | ||
254 | #define SM_RX_ID 0 | ||
255 | #define SM_TX_ID 1 | ||
235 | } status_blk; | 256 | } status_blk; |
236 | 257 | ||
237 | struct host_def_status_block *bnx2x_def_status_blk; | 258 | struct host_sp_status_block *bnx2x_def_status_blk; |
238 | 259 | ||
239 | u32 status_blk_num; | 260 | u32 status_blk_num; |
261 | u32 bnx2x_igu_sb_id; | ||
240 | u32 int_num; | 262 | u32 int_num; |
241 | u32 last_status_idx; | 263 | u32 last_status_idx; |
242 | struct tasklet_struct cnic_irq_task; | 264 | struct tasklet_struct cnic_irq_task; |
@@ -358,24 +380,33 @@ struct bnx2x_bd_chain_next { | |||
358 | (BNX2X_MAX_RCQ_DESC_CNT - 1)) ? \ | 380 | (BNX2X_MAX_RCQ_DESC_CNT - 1)) ? \ |
359 | ((x) + 2) : ((x) + 1) | 381 | ((x) + 2) : ((x) + 1) |
360 | 382 | ||
361 | #define BNX2X_DEF_SB_ID 16 | 383 | #define BNX2X_DEF_SB_ID HC_SP_SB_ID |
362 | 384 | ||
363 | #define BNX2X_ISCSI_RX_SB_INDEX_NUM \ | 385 | #define BNX2X_SHMEM_MF_BLK_OFFSET 0x7e4 |
364 | ((HC_INDEX_DEF_U_ETH_ISCSI_RX_CQ_CONS << \ | ||
365 | USTORM_ETH_ST_CONTEXT_CONFIG_CQE_SB_INDEX_NUMBER_SHIFT) & \ | ||
366 | USTORM_ETH_ST_CONTEXT_CONFIG_CQE_SB_INDEX_NUMBER) | ||
367 | 386 | ||
368 | #define BNX2X_SHMEM_ADDR(base, field) (base + \ | 387 | #define BNX2X_SHMEM_ADDR(base, field) (base + \ |
369 | offsetof(struct shmem_region, field)) | 388 | offsetof(struct shmem_region, field)) |
370 | 389 | ||
371 | #define CNIC_PORT(cp) ((cp)->func % PORT_MAX) | 390 | #define BNX2X_SHMEM2_ADDR(base, field) (base + \ |
391 | offsetof(struct shmem2_region, field)) | ||
392 | |||
393 | #define BNX2X_SHMEM2_HAS(base, field) \ | ||
394 | ((base) && \ | ||
395 | (CNIC_RD(dev, BNX2X_SHMEM2_ADDR(base, size)) > \ | ||
396 | offsetof(struct shmem2_region, field))) | ||
397 | |||
398 | #define CNIC_PORT(cp) ((cp)->pfid & 1) | ||
372 | #define CNIC_FUNC(cp) ((cp)->func) | 399 | #define CNIC_FUNC(cp) ((cp)->func) |
373 | #define CNIC_E1HVN(cp) ((cp)->func >> 1) | 400 | #define CNIC_E1HVN(cp) ((cp)->pfid >> 1) |
374 | 401 | ||
375 | #define BNX2X_HW_CID(cp, x) (((CNIC_FUNC(cp) % PORT_MAX) << 23) | \ | 402 | #define BNX2X_HW_CID(cp, x) ((CNIC_PORT(cp) << 23) | \ |
376 | (CNIC_E1HVN(cp) << 17) | (x)) | 403 | (CNIC_E1HVN(cp) << 17) | (x)) |
377 | 404 | ||
378 | #define BNX2X_SW_CID(x) (x & 0x1ffff) | 405 | #define BNX2X_SW_CID(x) (x & 0x1ffff) |
379 | 406 | ||
407 | #define BNX2X_CL_QZONE_ID(cp, cli) \ | ||
408 | (cli + (CNIC_PORT(cp) * ETH_MAX_RX_CLIENTS_E1H)) | ||
409 | |||
410 | #define TCP_TSTORM_OOO_DROP_AND_PROC_ACK (0<<4) | ||
380 | #endif | 411 | #endif |
381 | 412 | ||