aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_ctx.c
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-07-26 16:07:42 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-27 14:15:25 -0400
commit4f96b988e8d404b8b32aefed27503b4538949a3c (patch)
tree22d6aa87665cd02c4f3815357e9242bc50ff428e /drivers/net/netxen/netxen_nic_ctx.c
parent24767ab16913bc27ba7a85698e5c0f591368647d (diff)
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)
647 } 647 }
648 rds_ring->desc_head = (struct rcv_desc *)addr; 648 rds_ring->desc_head = (struct rcv_desc *)addr;
649 649
650 if (adapter->fw_major < 4) 650 if (NX_IS_REVISION_P2(adapter->ahw.revision_id))
651 rds_ring->crb_rcv_producer = 651 rds_ring->crb_rcv_producer =
652 recv_crb_registers[port].crb_rcv_producer[ring]; 652 recv_crb_registers[port].crb_rcv_producer[ring];
653 } 653 }
@@ -675,7 +675,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
675 } 675 }
676 676
677 677
678 if (adapter->fw_major >= 4) { 678 if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
679 err = nx_fw_cmd_create_rx_ctx(adapter); 679 err = nx_fw_cmd_create_rx_ctx(adapter);
680 if (err) 680 if (err)
681 goto err_out_free; 681 goto err_out_free;
@@ -705,7 +705,7 @@ void netxen_free_hw_resources(struct netxen_adapter *adapter)
705 705
706 int port = adapter->portnum; 706 int port = adapter->portnum;
707 707
708 if (adapter->fw_major >= 4) { 708 if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
709 nx_fw_cmd_destroy_rx_ctx(adapter); 709 nx_fw_cmd_destroy_rx_ctx(adapter);
710 nx_fw_cmd_destroy_tx_ctx(adapter); 710 nx_fw_cmd_destroy_tx_ctx(adapter);
711 } else { 711 } else {