diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-07-26 16:07:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-27 13:57:29 -0400 |
commit | ca2ef330b5eb30e3bc7047f99fd4be9f1bad22be (patch) | |
tree | 785dac769d281d1575da81593eecc673624f99cd /drivers/net/netxen | |
parent | 6598b169b856793f8f9b80a3f3c5a48f5eaf40e3 (diff) |
netxen: configure interrupt coalesce defaults
Initialize and configure interrupt coalesing defaults
in the firmware, so that these also reflect in "ethool -c".
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index b3683260a0b6..76bdd5cee438 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -819,6 +819,20 @@ netxen_nic_free_irq(struct netxen_adapter *adapter) | |||
819 | } | 819 | } |
820 | } | 820 | } |
821 | 821 | ||
822 | static void | ||
823 | netxen_nic_init_coalesce_defaults(struct netxen_adapter *adapter) | ||
824 | { | ||
825 | adapter->coal.flags = NETXEN_NIC_INTR_DEFAULT; | ||
826 | adapter->coal.normal.data.rx_time_us = | ||
827 | NETXEN_DEFAULT_INTR_COALESCE_RX_TIME_US; | ||
828 | adapter->coal.normal.data.rx_packets = | ||
829 | NETXEN_DEFAULT_INTR_COALESCE_RX_PACKETS; | ||
830 | adapter->coal.normal.data.tx_time_us = | ||
831 | NETXEN_DEFAULT_INTR_COALESCE_TX_TIME_US; | ||
832 | adapter->coal.normal.data.tx_packets = | ||
833 | NETXEN_DEFAULT_INTR_COALESCE_TX_PACKETS; | ||
834 | } | ||
835 | |||
822 | static int | 836 | static int |
823 | netxen_nic_up(struct netxen_adapter *adapter, struct net_device *netdev) | 837 | netxen_nic_up(struct netxen_adapter *adapter, struct net_device *netdev) |
824 | { | 838 | { |
@@ -841,6 +855,9 @@ netxen_nic_up(struct netxen_adapter *adapter, struct net_device *netdev) | |||
841 | if (adapter->max_sds_rings > 1) | 855 | if (adapter->max_sds_rings > 1) |
842 | netxen_config_rss(adapter, 1); | 856 | netxen_config_rss(adapter, 1); |
843 | 857 | ||
858 | if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) | ||
859 | netxen_config_intr_coalesce(adapter); | ||
860 | |||
844 | netxen_napi_enable(adapter); | 861 | netxen_napi_enable(adapter); |
845 | 862 | ||
846 | if (adapter->capabilities & NX_FW_CAPABILITY_LINK_NOTIFICATION) | 863 | if (adapter->capabilities & NX_FW_CAPABILITY_LINK_NOTIFICATION) |
@@ -936,6 +953,9 @@ netxen_nic_attach(struct netxen_adapter *adapter) | |||
936 | goto err_out_free_rxbuf; | 953 | goto err_out_free_rxbuf; |
937 | } | 954 | } |
938 | 955 | ||
956 | if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) | ||
957 | netxen_nic_init_coalesce_defaults(adapter); | ||
958 | |||
939 | adapter->is_up = NETXEN_ADAPTER_UP_MAGIC; | 959 | adapter->is_up = NETXEN_ADAPTER_UP_MAGIC; |
940 | return 0; | 960 | return 0; |
941 | 961 | ||