Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 May 2011 20:44:34 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 192554 for review
Message-ID:  <201105032044.p43KiYKY016692@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help

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

Change 192554 by jhb@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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105032044.p43KiYKY016692>