diff options
Diffstat (limited to 'drivers/net/netxen/netxen_nic_main.c')
-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 9f33e442f403..13087782ac40 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) | |||
588 | adapter->pci_mem_read = netxen_nic_pci_mem_read_2M; | 588 | adapter->pci_mem_read = netxen_nic_pci_mem_read_2M; |
589 | adapter->pci_mem_write = netxen_nic_pci_mem_write_2M; | 589 | adapter->pci_mem_write = netxen_nic_pci_mem_write_2M; |
590 | 590 | ||
591 | mem_ptr0 = ioremap(mem_base, mem_len); | 591 | mem_ptr0 = pci_ioremap_bar(pdev, 0); |
592 | if (mem_ptr0 == NULL) { | ||
593 | dev_err(&pdev->dev, "failed to map PCI bar 0\n"); | ||
594 | return -EIO; | ||
595 | } | ||
596 | |||
592 | pci_len0 = mem_len; | 597 | pci_len0 = mem_len; |
593 | first_page_group_start = 0; | 598 | first_page_group_start = 0; |
594 | first_page_group_end = 0; | 599 | first_page_group_end = 0; |
@@ -795,9 +800,12 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
795 | * See if the firmware gave us a virtual-physical port mapping. | 800 | * See if the firmware gave us a virtual-physical port mapping. |
796 | */ | 801 | */ |
797 | adapter->physical_port = adapter->portnum; | 802 | adapter->physical_port = adapter->portnum; |
798 | i = adapter->pci_read_normalize(adapter, CRB_V2P(adapter->portnum)); | 803 | if (adapter->fw_major < 4) { |
799 | if (i != 0x55555555) | 804 | i = adapter->pci_read_normalize(adapter, |
800 | adapter->physical_port = i; | 805 | CRB_V2P(adapter->portnum)); |
806 | if (i != 0x55555555) | ||
807 | adapter->physical_port = i; | ||
808 | } | ||
801 | 809 | ||
802 | adapter->flags &= ~(NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED); | 810 | adapter->flags &= ~(NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED); |
803 | 811 | ||