aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
diff options
context:
space:
mode:
authorSony Chacko <sony.chacko@qlogic.com>2012-12-03 22:33:53 -0500
committerDavid S. Miller <davem@davemloft.net>2012-12-04 13:00:11 -0500
commit797884509d1f7dffa4fd1028a1f62a19705a518b (patch)
tree2ccf6985999662d36165d24319a0a487db5b2952 /drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
parent97ee45eb099a9a0f1dc992f98e9476cc159ee5e0 (diff)
qlcnic: move HW specific data to seperate structure
Move HW specific data to a seperate structure as part of refactoring 82xx adapter driver. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic.h')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic.h67
1 files changed, 34 insertions, 33 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index ebc5b069dddd..352a1e42cc36 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -365,11 +365,41 @@ struct qlcnic_hardware_context {
365 u8 pci_func; 365 u8 pci_func;
366 u8 linkup; 366 u8 linkup;
367 u8 loopback_state; 367 u8 loopback_state;
368 u8 beacon_state;
369 u8 has_link_events;
370 u8 fw_type;
371 u8 physical_port;
372 u8 reset_context;
373 u8 msix_supported;
374 u8 max_mac_filters;
375 u8 mc_enabled;
376 u8 max_mc_count;
377 u8 diag_test;
378 u8 num_msix;
379 u8 nic_mode;
380 char diag_cnt;
381
368 u16 port_type; 382 u16 port_type;
369 u16 board_type; 383 u16 board_type;
370 384
371 u8 beacon_state; 385 u16 link_speed;
386 u16 link_duplex;
387 u16 link_autoneg;
388 u16 module_type;
389
390 u16 op_mode;
391 u16 switch_mode;
392 u16 max_tx_ques;
393 u16 max_rx_ques;
394 u16 max_mtu;
395 u32 msg_enable;
396 u16 act_pci_func;
372 397
398 u32 capabilities;
399 u32 temp;
400 u32 int_vec_bit;
401 u32 fw_hal_version;
402 struct qlcnic_hardware_ops *hw_ops;
373 struct qlcnic_nic_intr_coalesce coal; 403 struct qlcnic_nic_intr_coalesce coal;
374 struct qlcnic_fw_dump fw_dump; 404 struct qlcnic_fw_dump fw_dump;
375}; 405};
@@ -430,6 +460,7 @@ struct qlcnic_host_sds_ring {
430} ____cacheline_internodealigned_in_smp; 460} ____cacheline_internodealigned_in_smp;
431 461
432struct qlcnic_host_tx_ring { 462struct qlcnic_host_tx_ring {
463 u16 ctx_id;
433 u32 producer; 464 u32 producer;
434 u32 sw_consumer; 465 u32 sw_consumer;
435 u32 num_desc; 466 u32 num_desc;
@@ -894,6 +925,7 @@ struct qlcnic_adapter {
894 unsigned long state; 925 unsigned long state;
895 u32 flags; 926 u32 flags;
896 927
928 int max_drv_tx_rings;
897 u16 num_txd; 929 u16 num_txd;
898 u16 num_rxd; 930 u16 num_rxd;
899 u16 num_jumbo_rxd; 931 u16 num_jumbo_rxd;
@@ -902,57 +934,28 @@ struct qlcnic_adapter {
902 934
903 u8 max_rds_rings; 935 u8 max_rds_rings;
904 u8 max_sds_rings; 936 u8 max_sds_rings;
905 u8 msix_supported;
906 u8 portnum; 937 u8 portnum;
907 u8 physical_port;
908 u8 reset_context;
909 938
910 u8 mc_enabled;
911 u8 max_mc_count;
912 u8 fw_wait_cnt; 939 u8 fw_wait_cnt;
913 u8 fw_fail_cnt; 940 u8 fw_fail_cnt;
914 u8 tx_timeo_cnt; 941 u8 tx_timeo_cnt;
915 u8 need_fw_reset; 942 u8 need_fw_reset;
916 943
917 u8 has_link_events;
918 u8 fw_type;
919 u16 tx_context_id;
920 u16 is_up; 944 u16 is_up;
921
922 u16 link_speed;
923 u16 link_duplex;
924 u16 link_autoneg;
925 u16 module_type;
926
927 u16 op_mode;
928 u16 switch_mode;
929 u16 max_tx_ques;
930 u16 max_rx_ques;
931 u16 max_mtu;
932 u16 pvid; 945 u16 pvid;
933 946
934 u32 fw_hal_version;
935 u32 capabilities;
936 u32 irq; 947 u32 irq;
937 u32 temp;
938
939 u32 int_vec_bit;
940 u32 heartbeat; 948 u32 heartbeat;
941 949
942 u8 max_mac_filters;
943 u8 dev_state; 950 u8 dev_state;
944 u8 diag_test;
945 char diag_cnt;
946 u8 reset_ack_timeo; 951 u8 reset_ack_timeo;
947 u8 dev_init_timeo; 952 u8 dev_init_timeo;
948 u16 msg_enable;
949 953
950 u8 mac_addr[ETH_ALEN]; 954 u8 mac_addr[ETH_ALEN];
951 955
952 u64 dev_rst_time; 956 u64 dev_rst_time;
953 u8 mac_learn; 957 u8 mac_learn;
954 unsigned long vlans[BITS_TO_LONGS(VLAN_N_VID)]; 958 unsigned long vlans[BITS_TO_LONGS(VLAN_N_VID)];
955
956 struct qlcnic_npar_info *npars; 959 struct qlcnic_npar_info *npars;
957 struct qlcnic_eswitch *eswitch; 960 struct qlcnic_eswitch *eswitch;
958 struct qlcnic_nic_template *nic_ops; 961 struct qlcnic_nic_template *nic_ops;
@@ -966,10 +969,8 @@ struct qlcnic_adapter {
966 void __iomem *isr_int_vec; 969 void __iomem *isr_int_vec;
967 970
968 struct msix_entry *msix_entries; 971 struct msix_entry *msix_entries;
969
970 struct delayed_work fw_work; 972 struct delayed_work fw_work;
971 973
972
973 struct qlcnic_filter_hash fhash; 974 struct qlcnic_filter_hash fhash;
974 975
975 spinlock_t tx_clean_lock; 976 spinlock_t tx_clean_lock;
@@ -1509,7 +1510,7 @@ struct qlcnic_nic_template {
1509}; 1510};
1510 1511
1511#define QLCDB(adapter, lvl, _fmt, _args...) do { \ 1512#define QLCDB(adapter, lvl, _fmt, _args...) do { \
1512 if (NETIF_MSG_##lvl & adapter->msg_enable) \ 1513 if (NETIF_MSG_##lvl & adapter->ahw->msg_enable) \
1513 printk(KERN_INFO "%s: %s: " _fmt, \ 1514 printk(KERN_INFO "%s: %s: " _fmt, \
1514 dev_name(&adapter->pdev->dev), \ 1515 dev_name(&adapter->pdev->dev), \
1515 __func__, ##_args); \ 1516 __func__, ##_args); \