PERFORCE change 231370 for review

John Baldwin jhb at FreeBSD.org
Tue Jul 23 13:09:34 UTC 2013


http://p4web.freebsd.org/@@231370?ac=10

Change 231370 by jhb at jhb_pippin on 2013/07/23 13:09:33

	- Get correct ivars.
	- Debug.

Affected files ...

.. //depot/projects/pci/sys/dev/pci/pci.c#46 edit

Differences ...

==== //depot/projects/pci/sys/dev/pci/pci.c#46 (text+ko) ====

@@ -3246,7 +3246,7 @@
 	 */
 	sec_bus = PCI_READ_CONFIG(bus, dev, sec_reg, 1);
 	sub_bus = PCI_READ_CONFIG(bus, dev, sub_reg, 1);
-	if (bootverbose)
+	if (bootverbose || 1)
 		printf("\tsecbus=%d, subbus=%d\n", sec_bus, sub_bus);
 	if (sec_bus > 0 && sub_bus >= sec_bus) {
 		start = sec_bus;
@@ -3258,13 +3258,15 @@
 		res = resource_list_reserve(rl, bus, dev, PCI_RES_BUS, &rid,
 		    start, end, count, 0);
 		if (res == NULL) {
-			if (bootverbose)
+			if (bootverbose || 1)
 				device_printf(bus,
 			    "pci%d:%d:%d:%d secbus failed to allocate\n",
 				    pci_get_domain(dev), pci_get_bus(dev),
 				    pci_get_slot(dev), pci_get_function(dev));
 			resource_list_delete(rl, PCI_RES_BUS, 0);
-		}
+		} else
+			/* XXX */
+			pci_printf(cfg, "allocated initial secbus range\n");
 	} else
 		res = NULL;
 	if (res == NULL) {
@@ -3283,7 +3285,7 @@
 	struct resource *res;
 	int sec_reg, sub_reg;
 
-	dinfo = device_get_ivars(dev);
+	dinfo = device_get_ivars(child);
 	cfg = &dinfo->cfg;
 	rl = &dinfo->resources;
 	switch (cfg->hdrtype & PCIM_HDRTYPE) {


More information about the p4-projects mailing list