summaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_ctx.c
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-07-26 20:07:42 +0000
committerDavid S. Miller <davem@davemloft.net>2009-07-27 11:15:25 -0700
commit4f96b988e8d404b8b32aefed27503b4538949a3c (patch)
tree22d6aa87665cd02c4f3815357e9242bc50ff428e /drivers/net/netxen/netxen_nic_ctx.c
parent24767ab16913bc27ba7a85698e5c0f591368647d (diff)
downloadtalos-op-linux-4f96b988e8d404b8b32aefed27503b4538949a3c.tar.gz
talos-op-linux-4f96b988e8d404b8b32aefed27503b4538949a3c.zip
netxen: clean up firmware version checks
NX2031 firmware version will never be > 4.0.0, so replace (adapter->fw_major < 4) checks with pci revision ID check. 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_ctx.c')
-rw-r--r--drivers/net/netxen/netxen_nic_ctx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c
index 9f8ae4719e2f..9e0469643d34 100644
--- a/drivers/net/netxen/netxen_nic_ctx.c
+++ b/drivers/net/netxen/netxen_nic_ctx.c
@@ -647,7 +647,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
}
rds_ring->desc_head = (struct rcv_desc *)addr;
- if (adapter->fw_major < 4)
+ if (NX_IS_REVISION_P2(adapter->ahw.revision_id))
rds_ring->crb_rcv_producer =
recv_crb_registers[port].crb_rcv_producer[ring];
}
@@ -675,7 +675,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
}
- if (adapter->fw_major >= 4) {
+ if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
err = nx_fw_cmd_create_rx_ctx(adapter);
if (err)
goto err_out_free;
@@ -705,7 +705,7 @@ void netxen_free_hw_resources(struct netxen_adapter *adapter)
int port = adapter->portnum;
- if (adapter->fw_major >= 4) {
+ if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
nx_fw_cmd_destroy_rx_ctx(adapter);
nx_fw_cmd_destroy_tx_ctx(adapter);
} else {
OpenPOWER on IntegriCloud