aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/netxen/netxen_nic.h')
-rw-r--r--drivers/net/netxen/netxen_nic.h27
1 files changed, 6 insertions, 21 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 2bc5eaae141f..7f20a03623a0 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -85,7 +85,7 @@
85 (sizeof(struct netxen_cmd_buffer) * adapter->max_tx_desc_count) 85 (sizeof(struct netxen_cmd_buffer) * adapter->max_tx_desc_count)
86#define RCV_BUFFSIZE \ 86#define RCV_BUFFSIZE \
87 (sizeof(struct netxen_rx_buffer) * rcv_desc->max_rx_desc_count) 87 (sizeof(struct netxen_rx_buffer) * rcv_desc->max_rx_desc_count)
88#define find_diff_among(a,b,range) ((a)<=(b)?((b)-(a)):((b)+(range)-(a))) 88#define find_diff_among(a,b,range) ((a)<(b)?((b)-(a)):((b)+(range)-(a)))
89 89
90#define NETXEN_NETDEV_STATUS 0x1 90#define NETXEN_NETDEV_STATUS 0x1
91#define NETXEN_RCV_PRODUCER_OFFSET 0 91#define NETXEN_RCV_PRODUCER_OFFSET 0
@@ -204,7 +204,7 @@ enum {
204 ? RCV_DESC_LRO : \ 204 ? RCV_DESC_LRO : \
205 (RCV_DESC_NORMAL))) 205 (RCV_DESC_NORMAL)))
206 206
207#define MAX_CMD_DESCRIPTORS 1024 207#define MAX_CMD_DESCRIPTORS 4096
208#define MAX_RCV_DESCRIPTORS 16384 208#define MAX_RCV_DESCRIPTORS 16384
209#define MAX_CMD_DESCRIPTORS_HOST (MAX_CMD_DESCRIPTORS / 4) 209#define MAX_CMD_DESCRIPTORS_HOST (MAX_CMD_DESCRIPTORS / 4)
210#define MAX_RCV_DESCRIPTORS_1G (MAX_RCV_DESCRIPTORS / 4) 210#define MAX_RCV_DESCRIPTORS_1G (MAX_RCV_DESCRIPTORS / 4)
@@ -818,15 +818,8 @@ struct netxen_adapter_stats {
818 u64 badskblen; 818 u64 badskblen;
819 u64 nocmddescriptor; 819 u64 nocmddescriptor;
820 u64 polled; 820 u64 polled;
821 u64 uphappy; 821 u64 rxdropped;
822 u64 updropped;
823 u64 uplcong;
824 u64 uphcong;
825 u64 upmcong;
826 u64 updunno;
827 u64 skbfreed;
828 u64 txdropped; 822 u64 txdropped;
829 u64 txnullskb;
830 u64 csummed; 823 u64 csummed;
831 u64 no_rcv; 824 u64 no_rcv;
832 u64 rxbytes; 825 u64 rxbytes;
@@ -842,7 +835,6 @@ struct netxen_rcv_desc_ctx {
842 u32 flags; 835 u32 flags;
843 u32 producer; 836 u32 producer;
844 u32 rcv_pending; /* Num of bufs posted in phantom */ 837 u32 rcv_pending; /* Num of bufs posted in phantom */
845 u32 rcv_free; /* Num of bufs in free list */
846 dma_addr_t phys_addr; 838 dma_addr_t phys_addr;
847 struct pci_dev *phys_pdev; 839 struct pci_dev *phys_pdev;
848 struct rcv_desc *desc_head; /* address of rx ring in Phantom */ 840 struct rcv_desc *desc_head; /* address of rx ring in Phantom */
@@ -889,8 +881,6 @@ struct netxen_adapter {
889 int mtu; 881 int mtu;
890 int portnum; 882 int portnum;
891 883
892 spinlock_t tx_lock;
893 spinlock_t lock;
894 struct work_struct watchdog_task; 884 struct work_struct watchdog_task;
895 struct timer_list watchdog_timer; 885 struct timer_list watchdog_timer;
896 struct work_struct tx_timeout_task; 886 struct work_struct tx_timeout_task;
@@ -899,16 +889,12 @@ struct netxen_adapter {
899 889
900 u32 cmd_producer; 890 u32 cmd_producer;
901 __le32 *cmd_consumer; 891 __le32 *cmd_consumer;
902
903 u32 last_cmd_consumer; 892 u32 last_cmd_consumer;
893
904 u32 max_tx_desc_count; 894 u32 max_tx_desc_count;
905 u32 max_rx_desc_count; 895 u32 max_rx_desc_count;
906 u32 max_jumbo_rx_desc_count; 896 u32 max_jumbo_rx_desc_count;
907 u32 max_lro_rx_desc_count; 897 u32 max_lro_rx_desc_count;
908 /* Num of instances active on cmd buffer ring */
909 u32 proc_cmd_buf_counter;
910
911 u32 num_threads, total_threads; /*Use to keep track of xmit threads */
912 898
913 u32 flags; 899 u32 flags;
914 u32 irq; 900 u32 irq;
@@ -942,6 +928,7 @@ struct netxen_adapter {
942 struct pci_dev *ctx_desc_pdev; 928 struct pci_dev *ctx_desc_pdev;
943 dma_addr_t ctx_desc_phys_addr; 929 dma_addr_t ctx_desc_phys_addr;
944 int intr_scheme; 930 int intr_scheme;
931 int msi_mode;
945 int (*enable_phy_interrupts) (struct netxen_adapter *); 932 int (*enable_phy_interrupts) (struct netxen_adapter *);
946 int (*disable_phy_interrupts) (struct netxen_adapter *); 933 int (*disable_phy_interrupts) (struct netxen_adapter *);
947 void (*handle_phy_intr) (struct netxen_adapter *); 934 void (*handle_phy_intr) (struct netxen_adapter *);
@@ -1075,12 +1062,10 @@ void netxen_tso_check(struct netxen_adapter *adapter,
1075 struct cmd_desc_type0 *desc, struct sk_buff *skb); 1062 struct cmd_desc_type0 *desc, struct sk_buff *skb);
1076int netxen_nic_hw_resources(struct netxen_adapter *adapter); 1063int netxen_nic_hw_resources(struct netxen_adapter *adapter);
1077void netxen_nic_clear_stats(struct netxen_adapter *adapter); 1064void netxen_nic_clear_stats(struct netxen_adapter *adapter);
1078int netxen_nic_rx_has_work(struct netxen_adapter *adapter);
1079int netxen_nic_tx_has_work(struct netxen_adapter *adapter);
1080void netxen_watchdog_task(struct work_struct *work); 1065void netxen_watchdog_task(struct work_struct *work);
1081void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ctx, 1066void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ctx,
1082 u32 ringid); 1067 u32 ringid);
1083int netxen_process_cmd_ring(unsigned long data); 1068int netxen_process_cmd_ring(struct netxen_adapter *adapter);
1084u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctx, int max); 1069u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctx, int max);
1085void netxen_nic_set_multi(struct net_device *netdev); 1070void netxen_nic_set_multi(struct net_device *netdev);
1086int netxen_nic_change_mtu(struct net_device *netdev, int new_mtu); 1071int netxen_nic_change_mtu(struct net_device *netdev, int new_mtu);