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>
This commit is contained in:
Dhananjay Phadke 2009-07-26 20:07:38 +00:00 committed by David S. Miller
parent 6598b169b8
commit ca2ef330b5

View file

@ -819,6 +819,20 @@ netxen_nic_free_irq(struct netxen_adapter *adapter)
}
}
static void
netxen_nic_init_coalesce_defaults(struct netxen_adapter *adapter)
{
adapter->coal.flags = NETXEN_NIC_INTR_DEFAULT;
adapter->coal.normal.data.rx_time_us =
NETXEN_DEFAULT_INTR_COALESCE_RX_TIME_US;
adapter->coal.normal.data.rx_packets =
NETXEN_DEFAULT_INTR_COALESCE_RX_PACKETS;
adapter->coal.normal.data.tx_time_us =
NETXEN_DEFAULT_INTR_COALESCE_TX_TIME_US;
adapter->coal.normal.data.tx_packets =
NETXEN_DEFAULT_INTR_COALESCE_TX_PACKETS;
}
static int
netxen_nic_up(struct netxen_adapter *adapter, struct net_device *netdev)
{
@ -841,6 +855,9 @@ netxen_nic_up(struct netxen_adapter *adapter, struct net_device *netdev)
if (adapter->max_sds_rings > 1)
netxen_config_rss(adapter, 1);
if (NX_IS_REVISION_P3(adapter->ahw.revision_id))
netxen_config_intr_coalesce(adapter);
netxen_napi_enable(adapter);
if (adapter->capabilities & NX_FW_CAPABILITY_LINK_NOTIFICATION)
@ -936,6 +953,9 @@ netxen_nic_attach(struct netxen_adapter *adapter)
goto err_out_free_rxbuf;
}
if (NX_IS_REVISION_P3(adapter->ahw.revision_id))
netxen_nic_init_coalesce_defaults(adapter);
adapter->is_up = NETXEN_ADAPTER_UP_MAGIC;
return 0;