PERFORCE change 94902 for review

John-Mark Gurney jmg at FreeBSD.org
Mon Apr 10 05:48:25 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=94902

Change 94902 by jmg at jmg_carbon-60 on 2006/04/10 05:47:57

	get the immediate subordinant device..

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/nexus.c#7 edit

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/nexus.c#7 (text+ko) ====

@@ -404,7 +404,6 @@
     u_long start, u_long end, u_long count, u_int flags)
 {
 	struct nexus_softc *sc;
-	struct nexus_devinfo *ndi;
 	struct rman *rm;
 	struct resource *rv;
 	struct resource_list_entry *rle;
@@ -414,7 +413,6 @@
 	needactivate = flags & RF_ACTIVE;
 	passthrough = (device_get_parent(child) != bus);
 	sc = device_get_softc(bus);
-	ndi = device_get_ivars(child);
 	rle = NULL;
 
 	if (!passthrough) {
@@ -433,6 +431,14 @@
 
 	switch (type) {
 	case SYS_RES_IRQ:
+		/* find the immediate subordinate */
+		struct nexus_devinfo *ndi;
+		device_t subord;
+
+		subord = child;
+		while (device_get_parent(subord) != bus)
+			subord = device_get_parent(subord);
+		ndi = device_get_ivars(subord);
 		rm = &ndi->ndi_intr_rman;
 		break;
 	case SYS_RES_MEMORY:


More information about the p4-projects mailing list