/* We can't use pci_find_device() here since we are called from interrupt context.  */
static void pcibios_bus_report_status(struct pci_bus *bus, u_int status_mask, int warn)
/* We can't use pci_find_device() here since we are called from interrupt context.  */
static void pcibios_bus_report_status(struct pci_bus *bus, u_int status_mask, int warn)
{
	struct pci_dev *dev;
	list_for_each_entry(dev, &bus->devices, bus_list) {
		u16 status;
		if (dev->bus->number == 0 && dev->devfn == 0)
			continue;
		pci_read_config_word(dev, PCI_STATUS, &status);
		if (status == 0xffff)
			continue;
		if ((status & status_mask) == 0)
			continue;
		pci_write_config_word(dev, PCI_STATUS, status & status_mask);
		if (warn)
			printk("(%s: %04X) ", pci_name(dev), status);
	}
	list_for_each_entry(dev, &bus->devices, bus_list)
		if (dev->subordinate)
			pcibios_bus_report_status(dev->subordinate, status_mask, warn);
}