e1000: Fix PCI enable to honor the need_ioport flag

On machine were no IO ports are assigned the call
to pci_enable_device() will fail, even if need_ioport
is false, we need to use pci_enable_device_mem() here.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Karsten Keil 2009-02-03 15:18:01 -08:00 committed by David S. Miller
parent 714c48f1bb
commit 4d7155b932

View File

@ -940,7 +940,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
err = pci_enable_device(pdev);
} else {
bars = pci_select_bars(pdev, IORESOURCE_MEM);
err = pci_enable_device(pdev);
err = pci_enable_device_mem(pdev);
}
if (err)
return err;