PERFORCE change 192554 for review

John Baldwin jhb at FreeBSD.org
Tue May 3 20:44:35 UTC 2011


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

Change 192554 by jhb at jhb_jhbbsd on 2011/05/03 20:44:20

	Debug.

Affected files ...

.. //depot/projects/pci/sys/dev/pci/pci_domain.c#5 edit

Differences ...

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

@@ -373,13 +373,22 @@
 	}
 		   
 	/* Try to allocate from each decoded range. */
+	device_printf(hr->hr_pcib,
+	    "trying to allocate %#lx-%#lx for rid %x type %d\n", start, end,
+	    *rid, type);
 	for (; rle != NULL; rle = STAILQ_NEXT(rle, link)) {
 		if (rle->type != type)
 			continue;
 		new_start = ulmax(start, rle->start);
 		new_end = ulmin(end, rle->end);
-		if (new_start + count > new_end)
+		if (new_start > new_end ||
+		    new_start + count > new_end ||
+		    new_start + count < new_start) {
+			printf("\tskipping range %#lx-%#lx\n", new_start,
+			    new_end);
 			continue;
+		}
+		printf("\ttrying range %#lx-%#lx\n", new_start, new_end);
 		r = bus_generic_alloc_resource(hr->hr_pcib, dev, type, rid,
 		    new_start, new_end, count, flags);
 		if (r != NULL)


More information about the p4-projects mailing list