diff options
author | Vlad Zolotarov <vladz@broadcom.com> | 2011-06-14 07:33:44 -0400 |
---|---|---|
committer | David S. Miller <davem@conan.davemloft.net> | 2011-06-15 10:56:37 -0400 |
commit | 619c5cb6885b936c44ae1422ef805b69c6291485 (patch) | |
tree | 4604ae08f1eb12c6ad1f65106879c2e73946ae12 /drivers/net/cnic.h | |
parent | 042181f5aa8833a8918e1a91cfaf292146ffc62c (diff) |
New 7.0 FW: bnx2x, cnic, bnx2i, bnx2fc
New FW/HSI (7.0):
- Added support to 578xx chips
- Improved HSI - much less driver's direct access to the FW internal
memory needed.
New implementation of the HSI handling layer in the bnx2x (bnx2x_sp.c):
- Introduced chip dependent objects that have chip independent interfaces
for configuration of MACs, multicast addresses, Rx mode, indirection table,
fast path queues and function initialization/cleanup.
- Objects functionality is based on the private function pointers, which
allows not only a per-chip but also PF/VF differentiation while still
preserving the same interface towards the driver.
- Objects interface is not influenced by the HSI changes which do not require
providing new parameters keeping the code outside the bnx2x_sp.c invariant
with regard to such HSI chnages.
Changes in a CNIC, bnx2fc and bnx2i modules due to the new HSI.
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'drivers/net/cnic.h')
-rw-r--r-- | drivers/net/cnic.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h index eb11821108a0..330ef9350413 100644 --- a/drivers/net/cnic.h +++ b/drivers/net/cnic.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* cnic.h: Broadcom CNIC core network driver. | 1 | /* cnic.h: Broadcom CNIC core network driver. |
2 | * | 2 | * |
3 | * Copyright (c) 2006-2010 Broadcom Corporation | 3 | * Copyright (c) 2006-2011 Broadcom Corporation |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
@@ -68,11 +68,6 @@ | |||
68 | #define BNX2_PG_CTX_MAP 0x1a0034 | 68 | #define BNX2_PG_CTX_MAP 0x1a0034 |
69 | #define BNX2_ISCSI_CTX_MAP 0x1a0074 | 69 | #define BNX2_ISCSI_CTX_MAP 0x1a0074 |
70 | 70 | ||
71 | struct cnic_redirect_entry { | ||
72 | struct dst_entry *old_dst; | ||
73 | struct dst_entry *new_dst; | ||
74 | }; | ||
75 | |||
76 | #define MAX_COMPLETED_KCQE 64 | 71 | #define MAX_COMPLETED_KCQE 64 |
77 | 72 | ||
78 | #define MAX_CNIC_L5_CONTEXT 256 | 73 | #define MAX_CNIC_L5_CONTEXT 256 |
@@ -171,6 +166,7 @@ struct cnic_context { | |||
171 | unsigned long ctx_flags; | 166 | unsigned long ctx_flags; |
172 | #define CTX_FL_OFFLD_START 0 | 167 | #define CTX_FL_OFFLD_START 0 |
173 | #define CTX_FL_DELETE_WAIT 1 | 168 | #define CTX_FL_DELETE_WAIT 1 |
169 | #define CTX_FL_CID_ERROR 2 | ||
174 | u8 ulp_proto_id; | 170 | u8 ulp_proto_id; |
175 | union { | 171 | union { |
176 | struct cnic_iscsi *iscsi; | 172 | struct cnic_iscsi *iscsi; |
@@ -245,7 +241,7 @@ struct cnic_local { | |||
245 | u16 rx_cons; | 241 | u16 rx_cons; |
246 | u16 tx_cons; | 242 | u16 tx_cons; |
247 | 243 | ||
248 | struct iro *iro_arr; | 244 | const struct iro *iro_arr; |
249 | #define IRO (((struct cnic_local *) dev->cnic_priv)->iro_arr) | 245 | #define IRO (((struct cnic_local *) dev->cnic_priv)->iro_arr) |
250 | 246 | ||
251 | struct cnic_dma kwq_info; | 247 | struct cnic_dma kwq_info; |
@@ -286,7 +282,6 @@ struct cnic_local { | |||
286 | struct cnic_sock *csk_tbl; | 282 | struct cnic_sock *csk_tbl; |
287 | struct cnic_id_tbl csk_port_tbl; | 283 | struct cnic_id_tbl csk_port_tbl; |
288 | 284 | ||
289 | struct cnic_dma conn_buf_info; | ||
290 | struct cnic_dma gbl_buf_info; | 285 | struct cnic_dma gbl_buf_info; |
291 | 286 | ||
292 | struct cnic_iscsi *iscsi_tbl; | 287 | struct cnic_iscsi *iscsi_tbl; |
@@ -320,6 +315,11 @@ struct cnic_local { | |||
320 | u32 chip_id; | 315 | u32 chip_id; |
321 | int func; | 316 | int func; |
322 | u32 pfid; | 317 | u32 pfid; |
318 | u8 port_mode; | ||
319 | #define CHIP_4_PORT_MODE 0 | ||
320 | #define CHIP_2_PORT_MODE 1 | ||
321 | #define CHIP_PORT_MODE_NONE 2 | ||
322 | |||
323 | u32 shmem_base; | 323 | u32 shmem_base; |
324 | 324 | ||
325 | struct cnic_ops *cnic_ops; | 325 | struct cnic_ops *cnic_ops; |
@@ -369,7 +369,6 @@ struct bnx2x_bd_chain_next { | |||
369 | #define BNX2X_ISCSI_MAX_PENDING_R2TS 4 | 369 | #define BNX2X_ISCSI_MAX_PENDING_R2TS 4 |
370 | #define BNX2X_ISCSI_R2TQE_SIZE 8 | 370 | #define BNX2X_ISCSI_R2TQE_SIZE 8 |
371 | #define BNX2X_ISCSI_HQ_BD_SIZE 64 | 371 | #define BNX2X_ISCSI_HQ_BD_SIZE 64 |
372 | #define BNX2X_ISCSI_CONN_BUF_SIZE 64 | ||
373 | #define BNX2X_ISCSI_GLB_BUF_SIZE 64 | 372 | #define BNX2X_ISCSI_GLB_BUF_SIZE 64 |
374 | #define BNX2X_ISCSI_PBL_NOT_CACHED 0xff | 373 | #define BNX2X_ISCSI_PBL_NOT_CACHED 0xff |
375 | #define BNX2X_ISCSI_PDU_HEADER_NOT_CACHED 0xff | 374 | #define BNX2X_ISCSI_PDU_HEADER_NOT_CACHED 0xff |
@@ -406,6 +405,7 @@ struct bnx2x_bd_chain_next { | |||
406 | #define BNX2X_CHIP_IS_E2(x) \ | 405 | #define BNX2X_CHIP_IS_E2(x) \ |
407 | (BNX2X_CHIP_IS_57712(x) || BNX2X_CHIP_IS_57712E(x) || \ | 406 | (BNX2X_CHIP_IS_57712(x) || BNX2X_CHIP_IS_57712E(x) || \ |
408 | BNX2X_CHIP_IS_57713(x) || BNX2X_CHIP_IS_57713E(x)) | 407 | BNX2X_CHIP_IS_57713(x) || BNX2X_CHIP_IS_57713E(x)) |
408 | #define BNX2X_CHIP_IS_E2_PLUS(x) BNX2X_CHIP_IS_E2(x) | ||
409 | 409 | ||
410 | #define IS_E1H_OFFSET BNX2X_CHIP_IS_E1H(cp->chip_id) | 410 | #define IS_E1H_OFFSET BNX2X_CHIP_IS_E1H(cp->chip_id) |
411 | 411 | ||
@@ -442,8 +442,8 @@ struct bnx2x_bd_chain_next { | |||
442 | 442 | ||
443 | #define CNIC_PORT(cp) ((cp)->pfid & 1) | 443 | #define CNIC_PORT(cp) ((cp)->pfid & 1) |
444 | #define CNIC_FUNC(cp) ((cp)->func) | 444 | #define CNIC_FUNC(cp) ((cp)->func) |
445 | #define CNIC_PATH(cp) (!BNX2X_CHIP_IS_E2(cp->chip_id) ? 0 :\ | 445 | #define CNIC_PATH(cp) (!BNX2X_CHIP_IS_E2_PLUS(cp->chip_id) ? \ |
446 | (CNIC_FUNC(cp) & 1)) | 446 | 0 : (CNIC_FUNC(cp) & 1)) |
447 | #define CNIC_E1HVN(cp) ((cp)->pfid >> 1) | 447 | #define CNIC_E1HVN(cp) ((cp)->pfid >> 1) |
448 | 448 | ||
449 | #define BNX2X_HW_CID(cp, x) ((CNIC_PORT(cp) << 23) | \ | 449 | #define BNX2X_HW_CID(cp, x) ((CNIC_PORT(cp) << 23) | \ |
@@ -452,10 +452,15 @@ struct bnx2x_bd_chain_next { | |||
452 | #define BNX2X_SW_CID(x) (x & 0x1ffff) | 452 | #define BNX2X_SW_CID(x) (x & 0x1ffff) |
453 | 453 | ||
454 | #define BNX2X_CL_QZONE_ID(cp, cli) \ | 454 | #define BNX2X_CL_QZONE_ID(cp, cli) \ |
455 | (cli + (CNIC_PORT(cp) * (BNX2X_CHIP_IS_E2(cp->chip_id) ?\ | 455 | (BNX2X_CHIP_IS_E2_PLUS(cp->chip_id) ? cli : \ |
456 | ETH_MAX_RX_CLIENTS_E2 : \ | 456 | cli + (CNIC_PORT(cp) * ETH_MAX_RX_CLIENTS_E1H)) |
457 | ETH_MAX_RX_CLIENTS_E1H))) | 457 | |
458 | #ifndef MAX_STAT_COUNTER_ID | ||
459 | #define MAX_STAT_COUNTER_ID \ | ||
460 | (BNX2X_CHIP_IS_E1H((cp)->chip_id) ? MAX_STAT_COUNTER_ID_E1H : \ | ||
461 | ((BNX2X_CHIP_IS_E2_PLUS((cp)->chip_id)) ? MAX_STAT_COUNTER_ID_E2 :\ | ||
462 | MAX_STAT_COUNTER_ID_E1)) | ||
463 | #endif | ||
458 | 464 | ||
459 | #define TCP_TSTORM_OOO_DROP_AND_PROC_ACK (0<<4) | ||
460 | #endif | 465 | #endif |
461 | 466 | ||