diff options
author | Michael Chan <mchan@broadcom.com> | 2009-10-10 09:46:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-12 02:30:13 -0400 |
commit | 37b091bacba7bd329eced9a56998b6247da414c4 (patch) | |
tree | 4611c86c1dfd6dff1de9270e579b1cf5562f6792 /drivers/net/bnx2x.h | |
parent | e665bfda5b8fea586ddd028b26a6e2ed9e987c6b (diff) |
bnx2x: Add hw init code to support iSCSI.
Add code to initialize hardware blocks used for iSCSI.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x.h')
-rw-r--r-- | drivers/net/bnx2x.h | 59 |
1 files changed, 48 insertions, 11 deletions
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h index 1f0706328a3f..e94ce8370253 100644 --- a/drivers/net/bnx2x.h +++ b/drivers/net/bnx2x.h | |||
@@ -762,7 +762,11 @@ struct bnx2x_eth_stats { | |||
762 | (offsetof(struct bnx2x_eth_stats, stat_name) / 4) | 762 | (offsetof(struct bnx2x_eth_stats, stat_name) / 4) |
763 | 763 | ||
764 | 764 | ||
765 | #ifdef BCM_CNIC | ||
766 | #define MAX_CONTEXT 15 | ||
767 | #else | ||
765 | #define MAX_CONTEXT 16 | 768 | #define MAX_CONTEXT 16 |
769 | #endif | ||
766 | 770 | ||
767 | union cdu_context { | 771 | union cdu_context { |
768 | struct eth_context eth; | 772 | struct eth_context eth; |
@@ -811,13 +815,21 @@ struct bnx2x { | |||
811 | struct bnx2x_fastpath fp[MAX_CONTEXT]; | 815 | struct bnx2x_fastpath fp[MAX_CONTEXT]; |
812 | void __iomem *regview; | 816 | void __iomem *regview; |
813 | void __iomem *doorbells; | 817 | void __iomem *doorbells; |
818 | #ifdef BCM_CNIC | ||
819 | #define BNX2X_DB_SIZE (18*BCM_PAGE_SIZE) | ||
820 | #else | ||
814 | #define BNX2X_DB_SIZE (16*BCM_PAGE_SIZE) | 821 | #define BNX2X_DB_SIZE (16*BCM_PAGE_SIZE) |
822 | #endif | ||
815 | 823 | ||
816 | struct net_device *dev; | 824 | struct net_device *dev; |
817 | struct pci_dev *pdev; | 825 | struct pci_dev *pdev; |
818 | 826 | ||
819 | atomic_t intr_sem; | 827 | atomic_t intr_sem; |
828 | #ifdef BCM_CNIC | ||
829 | struct msix_entry msix_table[MAX_CONTEXT+2]; | ||
830 | #else | ||
820 | struct msix_entry msix_table[MAX_CONTEXT+1]; | 831 | struct msix_entry msix_table[MAX_CONTEXT+1]; |
832 | #endif | ||
821 | #define INT_MODE_INTx 1 | 833 | #define INT_MODE_INTx 1 |
822 | #define INT_MODE_MSI 2 | 834 | #define INT_MODE_MSI 2 |
823 | #define INT_MODE_MSIX 3 | 835 | #define INT_MODE_MSIX 3 |
@@ -891,6 +903,11 @@ struct bnx2x { | |||
891 | #define BP_E1HVN(bp) (bp->func >> 1) | 903 | #define BP_E1HVN(bp) (bp->func >> 1) |
892 | #define BP_L_ID(bp) (BP_E1HVN(bp) << 2) | 904 | #define BP_L_ID(bp) (BP_E1HVN(bp) << 2) |
893 | 905 | ||
906 | #ifdef BCM_CNIC | ||
907 | #define BCM_CNIC_CID_START 16 | ||
908 | #define BCM_ISCSI_ETH_CL_ID 17 | ||
909 | #endif | ||
910 | |||
894 | int pm_cap; | 911 | int pm_cap; |
895 | int pcie_cap; | 912 | int pcie_cap; |
896 | int mrrs; | 913 | int mrrs; |
@@ -960,24 +977,44 @@ struct bnx2x { | |||
960 | #define BNX2X_MAX_MULTICAST 64 | 977 | #define BNX2X_MAX_MULTICAST 64 |
961 | #define BNX2X_MAX_EMUL_MULTI 16 | 978 | #define BNX2X_MAX_EMUL_MULTI 16 |
962 | 979 | ||
980 | u32 rx_mode_cl_mask; | ||
981 | |||
963 | dma_addr_t def_status_blk_mapping; | 982 | dma_addr_t def_status_blk_mapping; |
964 | 983 | ||
965 | struct bnx2x_slowpath *slowpath; | 984 | struct bnx2x_slowpath *slowpath; |
966 | dma_addr_t slowpath_mapping; | 985 | dma_addr_t slowpath_mapping; |
967 | 986 | ||
968 | #ifdef BCM_ISCSI | ||
969 | void *t1; | ||
970 | dma_addr_t t1_mapping; | ||
971 | void *t2; | ||
972 | dma_addr_t t2_mapping; | ||
973 | void *timers; | ||
974 | dma_addr_t timers_mapping; | ||
975 | void *qm; | ||
976 | dma_addr_t qm_mapping; | ||
977 | #endif | ||
978 | |||
979 | int dropless_fc; | 987 | int dropless_fc; |
980 | 988 | ||
989 | #ifdef BCM_CNIC | ||
990 | u32 cnic_flags; | ||
991 | #define BNX2X_CNIC_FLAG_MAC_SET 1 | ||
992 | |||
993 | void *t1; | ||
994 | dma_addr_t t1_mapping; | ||
995 | void *t2; | ||
996 | dma_addr_t t2_mapping; | ||
997 | void *timers; | ||
998 | dma_addr_t timers_mapping; | ||
999 | void *qm; | ||
1000 | dma_addr_t qm_mapping; | ||
1001 | struct cnic_ops *cnic_ops; | ||
1002 | void *cnic_data; | ||
1003 | u32 cnic_tag; | ||
1004 | struct cnic_eth_dev cnic_eth_dev; | ||
1005 | struct host_status_block *cnic_sb; | ||
1006 | dma_addr_t cnic_sb_mapping; | ||
1007 | #define CNIC_SB_ID(bp) BP_L_ID(bp) | ||
1008 | struct eth_spe *cnic_kwq; | ||
1009 | struct eth_spe *cnic_kwq_prod; | ||
1010 | struct eth_spe *cnic_kwq_cons; | ||
1011 | struct eth_spe *cnic_kwq_last; | ||
1012 | u16 cnic_kwq_pending; | ||
1013 | u16 cnic_spq_pending; | ||
1014 | struct mutex cnic_mutex; | ||
1015 | u8 iscsi_mac[6]; | ||
1016 | #endif | ||
1017 | |||
981 | int dmae_ready; | 1018 | int dmae_ready; |
982 | /* used to synchronize dmae accesses */ | 1019 | /* used to synchronize dmae accesses */ |
983 | struct mutex dmae_mutex; | 1020 | struct mutex dmae_mutex; |