diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-07-27 00:07:42 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-27 22:15:25 +0400 |
commit | 4f96b988e8d404b8b32aefed27503b4538949a3c (patch) | |
tree | 22d6aa87665cd02c4f3815357e9242bc50ff428e /drivers/net/netxen/netxen_nic_main.c | |
parent | 24767ab16913bc27ba7a85698e5c0f591368647d (diff) | |
download | linux-4f96b988e8d404b8b32aefed27503b4538949a3c.tar.xz |
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_main.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 1aa850a0b895..5d52630ecd88 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -932,7 +932,7 @@ netxen_nic_attach(struct netxen_adapter *adapter) goto err_out_free_sw; } - if (adapter->fw_major < 4) { + if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { tx_ring = adapter->tx_ring; tx_ring->crb_cmd_producer = crb_cmd_producer[adapter->portnum]; tx_ring->crb_cmd_consumer = crb_cmd_consumer[adapter->portnum]; @@ -1103,7 +1103,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) * See if the firmware gave us a virtual-physical port mapping. */ adapter->physical_port = adapter->portnum; - if (adapter->fw_major < 4) { + if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { i = NXRD32(adapter, CRB_V2P(adapter->portnum)); if (i != 0x55555555) adapter->physical_port = i; @@ -1727,7 +1727,7 @@ static irqreturn_t netxen_intr(int irq, void *data) } /* clear interrupt */ - if (adapter->fw_major < 4) + if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) netxen_nic_disable_int(sds_ring); adapter->pci_write_immediate(adapter, |