diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/8139too.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index f62ac64e98fe..8a5b0d293f75 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -788,6 +788,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, | |||
788 | DPRINTK("PIO region size == 0x%02X\n", pio_len); | 788 | DPRINTK("PIO region size == 0x%02X\n", pio_len); |
789 | DPRINTK("MMIO region size == 0x%02lX\n", mmio_len); | 789 | DPRINTK("MMIO region size == 0x%02lX\n", mmio_len); |
790 | 790 | ||
791 | retry: | ||
791 | if (use_io) { | 792 | if (use_io) { |
792 | /* make sure PCI base addr 0 is PIO */ | 793 | /* make sure PCI base addr 0 is PIO */ |
793 | if (!(pio_flags & IORESOURCE_IO)) { | 794 | if (!(pio_flags & IORESOURCE_IO)) { |
@@ -836,9 +837,10 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, | |||
836 | /* ioremap MMIO region */ | 837 | /* ioremap MMIO region */ |
837 | ioaddr = pci_iomap(pdev, 1, 0); | 838 | ioaddr = pci_iomap(pdev, 1, 0); |
838 | if (ioaddr == NULL) { | 839 | if (ioaddr == NULL) { |
839 | dev_err(&pdev->dev, "cannot remap MMIO, aborting\n"); | 840 | dev_err(&pdev->dev, "cannot remap MMIO, trying PIO\n"); |
840 | rc = -EIO; | 841 | pci_release_regions(pdev); |
841 | goto err_out; | 842 | use_io = 1; |
843 | goto retry; | ||
842 | } | 844 | } |
843 | dev->base_addr = (long) ioaddr; | 845 | dev->base_addr = (long) ioaddr; |
844 | tp->regs_len = mmio_len; | 846 | tp->regs_len = mmio_len; |