diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-24 03:51:03 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-24 03:51:03 -0800 |
commit | 5325a7bf92d5bcac39dbefdfcc214379d17f3d3a (patch) | |
tree | 1601191587fa8d2ab627f1910ee60219015cacae /drivers/net/netxen | |
parent | e70049b9e74267dd47e1ffa62302073487afcb48 (diff) | |
parent | 028e1415a78733fcd2cba4b4c001826cc37a373e (diff) | |
download | op-kernel-dev-5325a7bf92d5bcac39dbefdfcc214379d17f3d3a.zip op-kernel-dev-5325a7bf92d5bcac39dbefdfcc214379d17f3d3a.tar.gz |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 7401779..2648e90 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -588,7 +588,12 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) adapter->pci_mem_read = netxen_nic_pci_mem_read_2M; adapter->pci_mem_write = netxen_nic_pci_mem_write_2M; - mem_ptr0 = ioremap(mem_base, mem_len); + mem_ptr0 = pci_ioremap_bar(pdev, 0); + if (mem_ptr0 == NULL) { + dev_err(&pdev->dev, "failed to map PCI bar 0\n"); + return -EIO; + } + pci_len0 = mem_len; first_page_group_start = 0; first_page_group_end = 0; @@ -796,9 +801,12 @@ skip_doorbell: * See if the firmware gave us a virtual-physical port mapping. */ adapter->physical_port = adapter->portnum; - i = adapter->pci_read_normalize(adapter, CRB_V2P(adapter->portnum)); - if (i != 0x55555555) - adapter->physical_port = i; + if (adapter->fw_major < 4) { + i = adapter->pci_read_normalize(adapter, + CRB_V2P(adapter->portnum)); + if (i != 0x55555555) + adapter->physical_port = i; + } adapter->flags &= ~(NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED); |