File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -788,6 +788,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
788788 DPRINTK ("PIO region size == 0x%02X\n" , pio_len );
789789 DPRINTK ("MMIO region size == 0x%02lX\n" , mmio_len );
790790
791+ retry :
791792 if (use_io ) {
792793 /* make sure PCI base addr 0 is PIO */
793794 if (!(pio_flags & IORESOURCE_IO )) {
@@ -836,9 +837,10 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
836837 /* ioremap MMIO region */
837838 ioaddr = pci_iomap (pdev , 1 , 0 );
838839 if (ioaddr == NULL ) {
839- dev_err (& pdev -> dev , "cannot remap MMIO, aborting\n" );
840- rc = - EIO ;
841- goto err_out ;
840+ dev_err (& pdev -> dev , "cannot remap MMIO, trying PIO\n" );
841+ pci_release_regions (pdev );
842+ use_io = 1 ;
843+ goto retry ;
842844 }
843845 dev -> base_addr = (long ) ioaddr ;
844846 tp -> regs_len = mmio_len ;
You can’t perform that action at this time.
0 commit comments