From: Alan Stern Date: Wed, 10 Aug 2005 19:18:44 +0000 (-0400) Subject: [PATCH] PCI: Fix regression in pci_enable_device_bars X-Git-Tag: 2.1b_release~39784^2~21^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11f3859b1e85dd408756c72e228cfb5aa7230c87;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git [PATCH] PCI: Fix regression in pci_enable_device_bars 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. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index afee2de..3dcb83d 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -445,7 +445,7 @@ pci_enable_device_bars(struct pci_dev *dev, int bars) 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)