]> err.no Git - linux-2.6/commitdiff
[PATCH] PCI: Fix regression in pci_enable_device_bars
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 10 Aug 2005 19:18:44 +0000 (15:18 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Sep 2005 21:57:25 +0000 (14:57 -0700)
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 <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/pci.c

index afee2de3f3233a8ef811978dc056a43fd7632c12..3dcb83d7eb250c5171ff5eb7cb9cc1c410ae09ed 100644 (file)
@@ -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)