aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2010-10-05 23:14:54 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-06 17:09:22 -0400
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 275c36114d85..6c099811eee7 100644
--- a/drivers/net/cnic.h
+++ b/drivers/net/cnic.h
@@ -335,9 +335,7 @@ struct bnx2x_bd_chain_next {
335#define BNX2X_ISCSI_GLB_BUF_SIZE 64 335#define BNX2X_ISCSI_GLB_BUF_SIZE 64
336#define BNX2X_ISCSI_PBL_NOT_CACHED 0xff 336#define BNX2X_ISCSI_PBL_NOT_CACHED 0xff
337#define BNX2X_ISCSI_PDU_HEADER_NOT_CACHED 0xff 337#define BNX2X_ISCSI_PDU_HEADER_NOT_CACHED 0xff
338#define BNX2X_HW_CID(x, func) ((x) | (((func) % PORT_MAX) << 23) | \ 338
339 (((func) >> 1) << 17))
340#define BNX2X_SW_CID(x) (x & 0x1ffff)
341#define BNX2X_CHIP_NUM_57711 0x164f 339#define BNX2X_CHIP_NUM_57711 0x164f
342#define BNX2X_CHIP_NUM_57711E 0x1650 340#define BNX2X_CHIP_NUM_57711E 0x1650
343#define BNX2X_CHIP_NUM(x) (x >> 16) 341#define BNX2X_CHIP_NUM(x) (x >> 16)
@@ -372,5 +370,10 @@ struct bnx2x_bd_chain_next {
372#define CNIC_FUNC(cp) ((cp)->func) 370#define CNIC_FUNC(cp) ((cp)->func)
373#define CNIC_E1HVN(cp) ((cp)->func >> 1) 371#define CNIC_E1HVN(cp) ((cp)->func >> 1)
374 372
373#define BNX2X_HW_CID(cp, x) (((CNIC_FUNC(cp) % PORT_MAX) << 23) | \
374 (CNIC_E1HVN(cp) << 17) | (x))
375
376#define BNX2X_SW_CID(x) (x & 0x1ffff)
377
375#endif 378#endif
376 379