diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-04-07 18:50:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-08 18:58:30 -0400 |
commit | f6d21f44122630cc9549b8ffbab23ea8c68254e0 (patch) | |
tree | f4dd12d962fc94b303e1a6fdcfed691cfdd7b5cb /drivers/net/netxen/netxen_nic_main.c | |
parent | f98a9f693b5f4919d9c4085a2fd8d67c7e152f3e (diff) |
netxen: enable rss for NX2031
Enable multiple rx rings for older NX2031 chip, firmware 3.4.336
or newer supports this feature.
Signed-off-by: Amit Kumar Salecha <amit@netxen.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_main.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 8426092deda3..da9b90da5207 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -175,7 +175,8 @@ netxen_napi_add(struct netxen_adapter *adapter, struct net_device *netdev) | |||
175 | struct nx_host_sds_ring *sds_ring; | 175 | struct nx_host_sds_ring *sds_ring; |
176 | struct netxen_recv_context *recv_ctx = &adapter->recv_ctx; | 176 | struct netxen_recv_context *recv_ctx = &adapter->recv_ctx; |
177 | 177 | ||
178 | if (adapter->flags & NETXEN_NIC_MSIX_ENABLED) | 178 | if ((adapter->flags & NETXEN_NIC_MSIX_ENABLED) && |
179 | adapter->rss_supported) | ||
179 | adapter->max_sds_rings = (num_online_cpus() >= 4) ? 4 : 2; | 180 | adapter->max_sds_rings = (num_online_cpus() >= 4) ? 4 : 2; |
180 | else | 181 | else |
181 | adapter->max_sds_rings = 1; | 182 | adapter->max_sds_rings = 1; |
@@ -288,10 +289,22 @@ static void netxen_check_options(struct netxen_adapter *adapter) | |||
288 | else if (adapter->ahw.port_type == NETXEN_NIC_GBE) | 289 | else if (adapter->ahw.port_type == NETXEN_NIC_GBE) |
289 | adapter->num_rxd = MAX_RCV_DESCRIPTORS_1G; | 290 | adapter->num_rxd = MAX_RCV_DESCRIPTORS_1G; |
290 | 291 | ||
291 | if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) | 292 | adapter->msix_supported = 0; |
293 | if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { | ||
292 | adapter->msix_supported = !!use_msi_x; | 294 | adapter->msix_supported = !!use_msi_x; |
293 | else | 295 | adapter->rss_supported = !!use_msi_x; |
294 | adapter->msix_supported = 0; | 296 | } else if (adapter->fw_version >= NETXEN_VERSION_CODE(3, 4, 336)) { |
297 | switch (adapter->ahw.board_type) { | ||
298 | case NETXEN_BRDTYPE_P2_SB31_10G: | ||
299 | case NETXEN_BRDTYPE_P2_SB31_10G_CX4: | ||
300 | case NETXEN_BRDTYPE_P2_SB31_10G_HMEZ: | ||
301 | adapter->msix_supported = !!use_msi_x; | ||
302 | adapter->rss_supported = !!use_msi_x; | ||
303 | break; | ||
304 | default: | ||
305 | break; | ||
306 | } | ||
307 | } | ||
295 | 308 | ||
296 | adapter->num_txd = MAX_CMD_DESCRIPTORS_HOST; | 309 | adapter->num_txd = MAX_CMD_DESCRIPTORS_HOST; |
297 | adapter->num_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS; | 310 | adapter->num_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS; |