Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jan 2011 13:52:23 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r217940 - stable/8/sys/dev/mmc
Message-ID:  <201101271352.p0RDqNjt018654@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Jan 27 13:52:23 2011
New Revision: 217940
URL: http://svn.freebsd.org/changeset/base/217940

Log:
  MFC r208441:
  Report relative card address to NewBus as location string.

Modified:
  stable/8/sys/dev/mmc/mmc.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/mmc/mmc.c
==============================================================================
--- stable/8/sys/dev/mmc/mmc.c	Thu Jan 27 13:43:33 2011	(r217939)
+++ stable/8/sys/dev/mmc/mmc.c	Thu Jan 27 13:52:23 2011	(r217940)
@@ -1500,6 +1500,15 @@ mmc_delayed_attach(void *xsc)
 	config_intrhook_disestablish(&sc->config_intrhook);
 }
 
+static int
+mmc_child_location_str(device_t dev, device_t child, char *buf,
+    size_t buflen)
+{
+
+	snprintf(buf, buflen, "rca=0x%04x", mmc_get_rca(child));
+	return (0);
+}
+
 static device_method_t mmc_methods[] = {
 	/* device_if */
 	DEVMETHOD(device_probe, mmc_probe),
@@ -1511,6 +1520,7 @@ static device_method_t mmc_methods[] = {
 	/* Bus interface */
 	DEVMETHOD(bus_read_ivar, mmc_read_ivar),
 	DEVMETHOD(bus_write_ivar, mmc_write_ivar),
+	DEVMETHOD(bus_child_location_str, mmc_child_location_str),
 
 	/* MMC Bus interface */
 	DEVMETHOD(mmcbus_wait_for_request, mmc_wait_for_request),



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