[PATCH] Fix regression in pci_enable_device_bars

From: Alan Stern
Date: Wed Aug 10 2005 - 14:19:06 EST


Greg:

This patch (as552) fixes yet another small problem recently added. If an
attempt to put a PCI device back into D0 fails because the device doesn't
support PCI PM, it shouldn't count as error. Without this patch the UHCI
controllers on my Intel motherboard don't work.

Alan Stern



Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

Index: usb-2.6/drivers/pci/pci.c
===================================================================
--- usb-2.6.orig/drivers/pci/pci.c
+++ usb-2.6/drivers/pci/pci.c
@@ -441,7 +441,7 @@ pci_enable_device_bars(struct pci_dev *d
int err;

err = pci_set_power_state(dev, PCI_D0);
- if (err)
+ if (err < 0 && err != -EIO)
return err;
err = pcibios_enable_device(dev, bars);
if (err < 0)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/