]> git.hungrycats.org Git - linux/commitdiff
[ARM] Clean up PCI error reporting.
authorRussell King <rmk@flint.arm.linux.org.uk>
Wed, 17 Sep 2003 13:47:14 +0000 (14:47 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Wed, 17 Sep 2003 13:47:14 +0000 (14:47 +0100)
Don't try to clear PCI status on devices which are no longer present.
Only clear PCI status bits which we're interested in.
Use pci_name to report the device name.

arch/arm/kernel/bios32.c

index 85f41806eb6ceb57bd570c8c907f08355f0e7d12..82e5037464125b0e6a53fe30c46daea147086ab1 100644 (file)
@@ -35,18 +35,17 @@ void pcibios_report_status(u_int status_mask, int warn)
                        continue;
 
                pci_read_config_word(dev, PCI_STATUS, &status);
+               if (status == 0xffff)
+                       continue;
 
-               status &= status_mask;
-               if (status == 0)
+               if ((status & status_mask) == 0)
                        continue;
 
                /* clear the status errors */
-               pci_write_config_word(dev, PCI_STATUS, status);
+               pci_write_config_word(dev, PCI_STATUS, status & status_mask);
 
                if (warn)
-                       printk("(%02x:%02x.%d: %04X) ", dev->bus->number,
-                               PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn),
-                               status);
+                       printk("(%s: %04X) ", pci_name(dev), status);
        }
 }