PERFORCE change 171579 for review

John Baldwin jhb at FreeBSD.org
Wed Dec 9 20:39:22 UTC 2009


http://p4web.freebsd.org/chv.cgi?CH=171579

Change 171579 by jhb at jhb_jhbbsd on 2009/12/09 20:39:14

	Oops, need to call bus_activate_resource() when allocating a
	reserved resource if RF_ACTIVE is set.  Missed porting this over
	from the PCI bus driver.

Affected files ...

.. //depot/projects/multipass/sys/kern/subr_bus.c#11 edit

Differences ...

==== //depot/projects/multipass/sys/kern/subr_bus.c#11 (text+ko) ====

@@ -2991,6 +2991,9 @@
 	if (passthrough)
 		panic(
     "resource_list_reserve() should only be called for direct children");
+	if (flags & RF_ACTIVE)
+		panic(
+    "resource_list_reserve() should only reserve inactive resources");
 
 	r = resource_list_alloc(rl, bus, child, type, rid, start, end, count,
 	    flags);
@@ -3056,6 +3059,10 @@
 		if (rle->flags & RLE_RESERVED) {
 			if (rle->flags & RLE_ALLOCATED)
 				return (NULL);
+			else if ((flags & RF_ACTIVE) &&
+			    bus_activate_resource(child, type, *rid,
+			    rle->res) != 0)
+				return (NULL);
 			else
 				return (rle->res);
 		}


More information about the p4-projects mailing list