Skip to content

Commit

Permalink
netxen: configure interrupt coalesce defaults
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dhananjay Phadke authored and David S. Miller committed Jul 27, 2009
1 parent 6598b16 commit ca2ef33
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit ca2ef33

Please sign in to comment.