diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2008-07-21 22:44:00 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-07-22 17:50:55 -0400 |
commit | 7830b22cbc5f5e804469b74a3fe0d3a8ed88ca31 (patch) | |
tree | e7779997b1a62f7a4e0003d51132ec710981c258 /drivers/net/netxen/netxen_nic.h | |
parent | f0084a36d4d799c024a5211555334d56c91d236d (diff) |
netxen: cleanup unused variables/functions
o Reduce access to global arrays in data path.
o Remove duplicate/unused variables, unecessary alignment constraints.
o Use correct pci_dev instead of fallback device for consistent
allocations.
o Disable ethtool set_eeprom functionality for now, it was only used
for flashing firmware.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/netxen/netxen_nic.h')
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index da4c4fb97064..149bb60b0c46 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -132,7 +132,6 @@ | |||
132 | #define RX_JUMBO_DMA_MAP_LEN \ | 132 | #define RX_JUMBO_DMA_MAP_LEN \ |
133 | (MAX_RX_JUMBO_BUFFER_LENGTH - 2) | 133 | (MAX_RX_JUMBO_BUFFER_LENGTH - 2) |
134 | #define RX_LRO_DMA_MAP_LEN (MAX_RX_LRO_BUFFER_LENGTH - 2) | 134 | #define RX_LRO_DMA_MAP_LEN (MAX_RX_LRO_BUFFER_LENGTH - 2) |
135 | #define NETXEN_ROM_ROUNDUP 0x80000000ULL | ||
136 | 135 | ||
137 | /* | 136 | /* |
138 | * Maximum number of ring contexts | 137 | * Maximum number of ring contexts |
@@ -219,8 +218,6 @@ enum { | |||
219 | #define MPORT_MULTI_FUNCTION_MODE 0x2222 | 218 | #define MPORT_MULTI_FUNCTION_MODE 0x2222 |
220 | 219 | ||
221 | #include "netxen_nic_phan_reg.h" | 220 | #include "netxen_nic_phan_reg.h" |
222 | extern unsigned long long netxen_dma_mask; | ||
223 | extern unsigned long last_schedule_time; | ||
224 | 221 | ||
225 | /* | 222 | /* |
226 | * NetXen host-peg signal message structure | 223 | * NetXen host-peg signal message structure |
@@ -765,7 +762,6 @@ struct netxen_rx_buffer { | |||
765 | * contains interrupt info as well shared hardware info. | 762 | * contains interrupt info as well shared hardware info. |
766 | */ | 763 | */ |
767 | struct netxen_hardware_context { | 764 | struct netxen_hardware_context { |
768 | struct pci_dev *pdev; | ||
769 | void __iomem *pci_base0; | 765 | void __iomem *pci_base0; |
770 | void __iomem *pci_base1; | 766 | void __iomem *pci_base1; |
771 | void __iomem *pci_base2; | 767 | void __iomem *pci_base2; |
@@ -781,7 +777,6 @@ struct netxen_hardware_context { | |||
781 | u32 qg_linksup; | 777 | u32 qg_linksup; |
782 | /* Address of cmd ring in Phantom */ | 778 | /* Address of cmd ring in Phantom */ |
783 | struct cmd_desc_type0 *cmd_desc_head; | 779 | struct cmd_desc_type0 *cmd_desc_head; |
784 | struct pci_dev *cmd_desc_pdev; | ||
785 | dma_addr_t cmd_desc_phys_addr; | 780 | dma_addr_t cmd_desc_phys_addr; |
786 | struct netxen_adapter *adapter; | 781 | struct netxen_adapter *adapter; |
787 | int pci_func; | 782 | int pci_func; |
@@ -816,9 +811,8 @@ struct netxen_adapter_stats { | |||
816 | struct netxen_rcv_desc_ctx { | 811 | struct netxen_rcv_desc_ctx { |
817 | u32 flags; | 812 | u32 flags; |
818 | u32 producer; | 813 | u32 producer; |
819 | u32 rcv_pending; /* Num of bufs posted in phantom */ | ||
820 | dma_addr_t phys_addr; | 814 | dma_addr_t phys_addr; |
821 | struct pci_dev *phys_pdev; | 815 | u32 crb_rcv_producer; /* reg offset */ |
822 | struct rcv_desc *desc_head; /* address of rx ring in Phantom */ | 816 | struct rcv_desc *desc_head; /* address of rx ring in Phantom */ |
823 | u32 max_rx_desc_count; | 817 | u32 max_rx_desc_count; |
824 | u32 dma_size; | 818 | u32 dma_size; |
@@ -835,10 +829,9 @@ struct netxen_rcv_desc_ctx { | |||
835 | */ | 829 | */ |
836 | struct netxen_recv_context { | 830 | struct netxen_recv_context { |
837 | struct netxen_rcv_desc_ctx rcv_desc[NUM_RCV_DESC_RINGS]; | 831 | struct netxen_rcv_desc_ctx rcv_desc[NUM_RCV_DESC_RINGS]; |
838 | u32 status_rx_producer; | ||
839 | u32 status_rx_consumer; | 832 | u32 status_rx_consumer; |
833 | u32 crb_sts_consumer; /* reg offset */ | ||
840 | dma_addr_t rcv_status_desc_phys_addr; | 834 | dma_addr_t rcv_status_desc_phys_addr; |
841 | struct pci_dev *rcv_status_desc_pdev; | ||
842 | struct status_desc *rcv_status_desc_head; | 835 | struct status_desc *rcv_status_desc_head; |
843 | }; | 836 | }; |
844 | 837 | ||
@@ -854,7 +847,6 @@ struct netxen_dummy_dma { | |||
854 | struct netxen_adapter { | 847 | struct netxen_adapter { |
855 | struct netxen_hardware_context ahw; | 848 | struct netxen_hardware_context ahw; |
856 | 849 | ||
857 | struct netxen_adapter *master; | ||
858 | struct net_device *netdev; | 850 | struct net_device *netdev; |
859 | struct pci_dev *pdev; | 851 | struct pci_dev *pdev; |
860 | struct napi_struct napi; | 852 | struct napi_struct napi; |
@@ -873,6 +865,8 @@ struct netxen_adapter { | |||
873 | u32 cmd_producer; | 865 | u32 cmd_producer; |
874 | __le32 *cmd_consumer; | 866 | __le32 *cmd_consumer; |
875 | u32 last_cmd_consumer; | 867 | u32 last_cmd_consumer; |
868 | u32 crb_addr_cmd_producer; | ||
869 | u32 crb_addr_cmd_consumer; | ||
876 | 870 | ||
877 | u32 max_tx_desc_count; | 871 | u32 max_tx_desc_count; |
878 | u32 max_rx_desc_count; | 872 | u32 max_rx_desc_count; |
@@ -886,14 +880,12 @@ struct netxen_adapter { | |||
886 | 880 | ||
887 | struct netxen_adapter_stats stats; | 881 | struct netxen_adapter_stats stats; |
888 | 882 | ||
889 | u16 portno; | ||
890 | u16 link_speed; | 883 | u16 link_speed; |
891 | u16 link_duplex; | 884 | u16 link_duplex; |
892 | u16 state; | 885 | u16 state; |
893 | u16 link_autoneg; | 886 | u16 link_autoneg; |
894 | int rx_csum; | 887 | int rx_csum; |
895 | int status; | 888 | int status; |
896 | spinlock_t stats_lock; | ||
897 | 889 | ||
898 | struct netxen_cmd_buffer *cmd_buf_arr; /* Command buffers for xmit */ | 890 | struct netxen_cmd_buffer *cmd_buf_arr; /* Command buffers for xmit */ |
899 | 891 | ||
@@ -908,7 +900,6 @@ struct netxen_adapter { | |||
908 | 900 | ||
909 | /* Context interface shared between card and host */ | 901 | /* Context interface shared between card and host */ |
910 | struct netxen_ring_ctx *ctx_desc; | 902 | struct netxen_ring_ctx *ctx_desc; |
911 | struct pci_dev *ctx_desc_pdev; | ||
912 | dma_addr_t ctx_desc_phys_addr; | 903 | dma_addr_t ctx_desc_phys_addr; |
913 | int intr_scheme; | 904 | int intr_scheme; |
914 | int msi_mode; | 905 | int msi_mode; |
@@ -1034,8 +1025,6 @@ int netxen_rom_se(struct netxen_adapter *adapter, int addr); | |||
1034 | 1025 | ||
1035 | /* Functions from netxen_nic_isr.c */ | 1026 | /* Functions from netxen_nic_isr.c */ |
1036 | void netxen_initialize_adapter_sw(struct netxen_adapter *adapter); | 1027 | void netxen_initialize_adapter_sw(struct netxen_adapter *adapter); |
1037 | void *netxen_alloc(struct pci_dev *pdev, size_t sz, dma_addr_t * ptr, | ||
1038 | struct pci_dev **used_dev); | ||
1039 | void netxen_initialize_adapter_ops(struct netxen_adapter *adapter); | 1028 | void netxen_initialize_adapter_ops(struct netxen_adapter *adapter); |
1040 | int netxen_init_firmware(struct netxen_adapter *adapter); | 1029 | int netxen_init_firmware(struct netxen_adapter *adapter); |
1041 | void netxen_free_hw_resources(struct netxen_adapter *adapter); | 1030 | void netxen_free_hw_resources(struct netxen_adapter *adapter); |