summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c29
-rw-r--r--sys/dev/pci/pci_pci.c2
2 files changed, 30 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 6069b6d..e3b6159 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -3022,8 +3022,35 @@ pci_resume(device_t dev)
if (!device_is_attached(child))
pci_cfg_save(child, dinfo, 1);
}
+
+ /*
+ * Resume critical devices first, then everything else later.
+ */
+ for (i = 0; i < numdevs; i++) {
+ child = devlist[i];
+ switch (pci_get_class(child)) {
+ case PCIC_DISPLAY:
+ case PCIC_MEMORY:
+ case PCIC_BRIDGE:
+ case PCIC_BASEPERIPH:
+ DEVICE_RESUME(child);
+ break;
+ }
+ }
+ for (i = 0; i < numdevs; i++) {
+ child = devlist[i];
+ switch (pci_get_class(child)) {
+ case PCIC_DISPLAY:
+ case PCIC_MEMORY:
+ case PCIC_BRIDGE:
+ case PCIC_BASEPERIPH:
+ break;
+ default:
+ DEVICE_RESUME(child);
+ }
+ }
free(devlist, M_TEMP);
- return (bus_generic_resume(dev));
+ return (0);
}
static void
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 7915818..199c132 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -860,7 +860,9 @@ host_pcib_get_busno(pci_read_config_fn read_config, int bus, int slot, int func,
case 0x00171166:
case 0x01011166:
case 0x010f1014:
+ case 0x01101166:
case 0x02011166:
+ case 0x02251166:
case 0x03021014:
*busnum = read_config(bus, slot, func, 0x44, 1);
break;
OpenPOWER on IntegriCloud