aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/cnic.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2010-10-06 03:14:54 +0000
committerDavid S. Miller <davem@davemloft.net>2010-10-06 14:09:22 -0700
commitceb7e1c7c5ab86ca686d523f99ca473a1f3a984d (patch)
treef392ee76b6e43e862c20f89d209a50271c89c6bf /drivers/net/cnic.h
parent85407885d5d8e9eed9be8e4d33c519646b90d09f (diff)
cnic: Pass cp pointer to BNX2X_HW_CID.
Preparation work for upcoming firmware interface changes. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic.h')
-rw-r--r--drivers/net/cnic.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h
index 275c36114d8..6c099811eee 100644
--- a/drivers/net/cnic.h
+++ b/drivers/net/cnic.h
@@ -335,9 +335,7 @@ struct bnx2x_bd_chain_next {
#define BNX2X_ISCSI_GLB_BUF_SIZE 64
#define BNX2X_ISCSI_PBL_NOT_CACHED 0xff
#define BNX2X_ISCSI_PDU_HEADER_NOT_CACHED 0xff
-#define BNX2X_HW_CID(x, func) ((x) | (((func) % PORT_MAX) << 23) | \
- (((func) >> 1) << 17))
-#define BNX2X_SW_CID(x) (x & 0x1ffff)
+
#define BNX2X_CHIP_NUM_57711 0x164f
#define BNX2X_CHIP_NUM_57711E 0x1650
#define BNX2X_CHIP_NUM(x) (x >> 16)
@@ -372,5 +370,10 @@ struct bnx2x_bd_chain_next {
#define CNIC_FUNC(cp) ((cp)->func)
#define CNIC_E1HVN(cp) ((cp)->func >> 1)
+#define BNX2X_HW_CID(cp, x) (((CNIC_FUNC(cp) % PORT_MAX) << 23) | \
+ (CNIC_E1HVN(cp) << 17) | (x))
+
+#define BNX2X_SW_CID(x) (x & 0x1ffff)
+
#endif