diff options
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 @@ /* cnic.h: Broadcom CNIC core network driver. * - * Copyright (c) 2006-2010 Broadcom Corporation + * Copyright (c) 2006-2011 Broadcom Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,11 +68,6 @@ #define BNX2_PG_CTX_MAP 0x1a0034 #define BNX2_ISCSI_CTX_MAP 0x1a0074 -struct cnic_redirect_entry { - struct dst_entry *old_dst; - struct dst_entry *new_dst; -}; - #define MAX_COMPLETED_KCQE 64 #define MAX_CNIC_L5_CONTEXT 256 @@ -171,6 +166,7 @@ struct cnic_context { unsigned long ctx_flags; #define CTX_FL_OFFLD_START 0 #define CTX_FL_DELETE_WAIT 1 +#define CTX_FL_CID_ERROR 2 u8 ulp_proto_id; union { struct cnic_iscsi *iscsi; @@ -245,7 +241,7 @@ struct cnic_local { u16 rx_cons; u16 tx_cons; - struct iro *iro_arr; + const struct iro *iro_arr; #define IRO (((struct cnic_local *) dev->cnic_priv)->iro_arr) struct cnic_dma kwq_info; @@ -286,7 +282,6 @@ struct cnic_local { struct cnic_sock *csk_tbl; struct cnic_id_tbl csk_port_tbl; - struct cnic_dma conn_buf_info; struct cnic_dma gbl_buf_info; struct cnic_iscsi *iscsi_tbl; @@ -320,6 +315,11 @@ struct cnic_local { u32 chip_id; int func; u32 pfid; + u8 port_mode; +#define CHIP_4_PORT_MODE 0 +#define CHIP_2_PORT_MODE 1 +#define CHIP_PORT_MODE_NONE 2 + u32 shmem_base; struct cnic_ops *cnic_ops; @@ -369,7 +369,6 @@ struct bnx2x_bd_chain_next { #define BNX2X_ISCSI_MAX_PENDING_R2TS 4 #define BNX2X_ISCSI_R2TQE_SIZE 8 #define BNX2X_ISCSI_HQ_BD_SIZE 64 -#define BNX2X_ISCSI_CONN_BUF_SIZE 64 #define BNX2X_ISCSI_GLB_BUF_SIZE 64 #define BNX2X_ISCSI_PBL_NOT_CACHED 0xff #define BNX2X_ISCSI_PDU_HEADER_NOT_CACHED 0xff @@ -406,6 +405,7 @@ struct bnx2x_bd_chain_next { #define BNX2X_CHIP_IS_E2(x) \ (BNX2X_CHIP_IS_57712(x) || BNX2X_CHIP_IS_57712E(x) || \ BNX2X_CHIP_IS_57713(x) || BNX2X_CHIP_IS_57713E(x)) +#define BNX2X_CHIP_IS_E2_PLUS(x) BNX2X_CHIP_IS_E2(x) #define IS_E1H_OFFSET BNX2X_CHIP_IS_E1H(cp->chip_id) @@ -442,8 +442,8 @@ struct bnx2x_bd_chain_next { #define CNIC_PORT(cp) ((cp)->pfid & 1) #define CNIC_FUNC(cp) ((cp)->func) -#define CNIC_PATH(cp) (!BNX2X_CHIP_IS_E2(cp->chip_id) ? 0 :\ - (CNIC_FUNC(cp) & 1)) +#define CNIC_PATH(cp) (!BNX2X_CHIP_IS_E2_PLUS(cp->chip_id) ? \ + 0 : (CNIC_FUNC(cp) & 1)) #define CNIC_E1HVN(cp) ((cp)->pfid >> 1) #define BNX2X_HW_CID(cp, x) ((CNIC_PORT(cp) << 23) | \ @@ -452,10 +452,15 @@ struct bnx2x_bd_chain_next { #define BNX2X_SW_CID(x) (x & 0x1ffff) #define BNX2X_CL_QZONE_ID(cp, cli) \ - (cli + (CNIC_PORT(cp) * (BNX2X_CHIP_IS_E2(cp->chip_id) ?\ - ETH_MAX_RX_CLIENTS_E2 : \ - ETH_MAX_RX_CLIENTS_E1H))) + (BNX2X_CHIP_IS_E2_PLUS(cp->chip_id) ? cli : \ + cli + (CNIC_PORT(cp) * ETH_MAX_RX_CLIENTS_E1H)) + +#ifndef MAX_STAT_COUNTER_ID +#define MAX_STAT_COUNTER_ID \ + (BNX2X_CHIP_IS_E1H((cp)->chip_id) ? MAX_STAT_COUNTER_ID_E1H : \ + ((BNX2X_CHIP_IS_E2_PLUS((cp)->chip_id)) ? MAX_STAT_COUNTER_ID_E2 :\ + MAX_STAT_COUNTER_ID_E1)) +#endif -#define TCP_TSTORM_OOO_DROP_AND_PROC_ACK (0<<4) #endif |