From 36fed96550cc5e0c7c87d0c69eb5beccf1d2d77f Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 18 Mar 2005 05:19:50 +0000 Subject: Use STAILQ in preference to SLIST for the resources. Insert new resources last in the list rather than first. This makes the resouces print in the 4.x order rather than the 5.x order (eg fdc0 at 0x3f0-0x3f5,0x3f7 is 4.x, but 0x3f7,0x3f0-0x3f5 is 5.x). This also means that the pci code will once again print the resources in BAR ascending order. --- sys/dev/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 445b32b6a1d4b..8303c3b82c0e5 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1000,6 +1000,7 @@ pci_add_child(device_t bus, struct pci_devinfo *dinfo) pcib = device_get_parent(bus); dinfo->cfg.dev = device_add_child(bus, NULL, -1); device_set_ivars(dinfo->cfg.dev, dinfo); + resource_list_init(&dinfo->resources); pci_cfg_save(dinfo->cfg.dev, dinfo, 0); pci_cfg_restore(dinfo->cfg.dev, dinfo); pci_add_resources(pcib, bus, dinfo->cfg.dev); @@ -1153,7 +1154,6 @@ pci_driver_added(device_t dev, driver_t *driver) continue; dinfo = device_get_ivars(child); pci_print_verbose(dinfo); -/*XXX???*/ /* resource_list_init(&dinfo->cfg.resources); */ if (bootverbose) printf("pci%d:%d:%d: reprobing on driver added\n", dinfo->cfg.bus, dinfo->cfg.slot, dinfo->cfg.func); -- cgit v1.3