Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Dec 2009 20:39:21 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 171579 for review
Message-ID:  <200912092039.nB9KdLc9053604@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=171579

Change 171579 by jhb@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);
 		}



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