[patch 07/56] e1000: Fix PCI enable to honor the need_ioport flag

Greg KH
2009-02-11T00:30:39Z

[-- Attachment #1: e1000-fix-pci-enable-to-honor-the-need_ioport-flag.patch --]
[-- Type: text/plain, Size: 929 bytes --]

2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------

From: Karsten Keil <kkeil@suse.de>

commit 4d7155b932b8129c72e2f2714890e20b2a05e0b7 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/net/e1000/e1000_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -927,7 +927,7 @@ static int __devinit e1000_probe(struct
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;