svn commit: r207516 - stable/7/sys/sparc64/sparc64

Marius Strobl marius at FreeBSD.org
Sun May 2 16:38:57 UTC 2010


Author: marius
Date: Sun May  2 16:38:57 2010
New Revision: 207516
URL: http://svn.freebsd.org/changeset/base/207516

Log:
  MFC: r206448
  
  Do as the comment suggests and determine the bus space based on the last
  bus we actually mapped at rather than always based on the last bus we
  encountered while moving upward in the tree. Otherwise we might use the
  wrong bus space in case the bridge directly underneath the nexus doesn't
  require mapping, i.e. was skipped as it's the case for ssm(4) nodes.

Modified:
  stable/7/sys/sparc64/sparc64/ofw_machdep.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/sparc64/sparc64/ofw_machdep.c
==============================================================================
--- stable/7/sys/sparc64/sparc64/ofw_machdep.c	Sun May  2 16:36:15 2010	(r207515)
+++ stable/7/sys/sparc64/sparc64/ofw_machdep.c	Sun May  2 16:38:57 2010	(r207516)
@@ -187,13 +187,10 @@ OF_decode_addr(phandle_t node, int bank,
 			name[sizeof(name) - 1] = '\0';
 			goto skip;
 		}
-		if (lbus != bus) {
-			if (OF_getprop(bus, "#size-cells", &szc,
-			    sizeof(szc)) == -1)
-				szc = 1;
-			if (szc < 1 || szc > 2)
-				return (ENXIO);
-		}
+		if (OF_getprop(bus, "#size-cells", &szc, sizeof(szc)) == -1)
+			szc = 1;
+		if (szc < 1 || szc > 2)
+			return (ENXIO);
 		nbank /= sizeof(banks[0]) * (addrc + paddrc + szc);
 		bank = 0;
 		for (i = 0; i < nbank; i++) {
@@ -233,9 +230,9 @@ OF_decode_addr(phandle_t node, int bank,
 		}
 		if (i == nbank)
 			return (ENXIO);
+		lbus = bus;
  skip:
 		addrc = paddrc;
-		lbus = bus;
 		bus = pbus;
 	}
 


More information about the svn-src-stable-7 mailing list