Commit 733b8cab authored by Russell King's avatar Russell King

[ARM] Don't use pci_find_device in interrupt context.

parent 7c587454
...@@ -20,11 +20,15 @@ ...@@ -20,11 +20,15 @@
static int debug_pci; static int debug_pci;
void pcibios_report_status(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 = NULL; struct pci_dev *dev;
while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { list_for_each_entry(dev, &bus->devices, bus_list) {
u16 status; u16 status;
/* /*
...@@ -47,6 +51,21 @@ void pcibios_report_status(u_int status_mask, int warn) ...@@ -47,6 +51,21 @@ void pcibios_report_status(u_int status_mask, int warn)
if (warn) if (warn)
printk("(%s: %04X) ", pci_name(dev), status); 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);
}
void pcibios_report_status(u_int status_mask, int warn)
{
struct list_head *l;
list_for_each(l, &pci_root_buses) {
struct pci_bus *bus = pci_bus_b(l);
pcibios_bus_report_status(bus, status_mask, warn);
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment