summaryrefslogtreecommitdiffstats
path: root/sys/dev/mvs
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-05-22 07:32:47 +0000
committermav <mav@FreeBSD.org>2010-05-22 07:32:47 +0000
commit810a32455d43efc2de222a2109f0691456aa7645 (patch)
treefc393fbaa9f0ab9d5b7cfb97523cd0a46611a3a6 /sys/dev/mvs
parentd785fc2581eeec9fca9e7dab9ed758fe7af8fed1 (diff)
downloadFreeBSD-src-810a32455d43efc2de222a2109f0691456aa7645.zip
FreeBSD-src-810a32455d43efc2de222a2109f0691456aa7645.tar.gz
Report ATA/SATA channel number to NewBus at location string.
Diffstat (limited to 'sys/dev/mvs')
-rw-r--r--sys/dev/mvs/mvs_pci.c11
-rw-r--r--sys/dev/mvs/mvs_soc.c11
2 files changed, 22 insertions, 0 deletions
diff --git a/sys/dev/mvs/mvs_pci.c b/sys/dev/mvs/mvs_pci.c
index 4fae627..4e27f07 100644
--- a/sys/dev/mvs/mvs_pci.c
+++ b/sys/dev/mvs/mvs_pci.c
@@ -482,6 +482,16 @@ mvs_print_child(device_t dev, device_t child)
return (retval);
}
+static int
+mvs_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+
+ snprintf(buf, buflen, "channel=%d",
+ (int)(intptr_t)device_get_ivars(child));
+ return (0);
+}
+
static device_method_t mvs_methods[] = {
DEVMETHOD(device_probe, mvs_probe),
DEVMETHOD(device_attach, mvs_attach),
@@ -493,6 +503,7 @@ static device_method_t mvs_methods[] = {
DEVMETHOD(bus_release_resource, mvs_release_resource),
DEVMETHOD(bus_setup_intr, mvs_setup_intr),
DEVMETHOD(bus_teardown_intr,mvs_teardown_intr),
+ DEVMETHOD(bus_child_location_str, mvs_child_location_str),
DEVMETHOD(mvs_edma, mvs_edma),
{ 0, 0 }
};
diff --git a/sys/dev/mvs/mvs_soc.c b/sys/dev/mvs/mvs_soc.c
index 298a873..b16c4ae 100644
--- a/sys/dev/mvs/mvs_soc.c
+++ b/sys/dev/mvs/mvs_soc.c
@@ -413,6 +413,16 @@ mvs_print_child(device_t dev, device_t child)
return (retval);
}
+static int
+mvs_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+
+ snprintf(buf, buflen, "channel=%d",
+ (int)(intptr_t)device_get_ivars(child));
+ return (0);
+}
+
static device_method_t mvs_methods[] = {
DEVMETHOD(device_probe, mvs_probe),
DEVMETHOD(device_attach, mvs_attach),
@@ -425,6 +435,7 @@ static device_method_t mvs_methods[] = {
DEVMETHOD(bus_setup_intr, mvs_setup_intr),
DEVMETHOD(bus_teardown_intr,mvs_teardown_intr),
DEVMETHOD(mvs_edma, mvs_edma),
+ DEVMETHOD(bus_child_location_str, mvs_child_location_str),
{ 0, 0 }
};
static driver_t mvs_driver = {
OpenPOWER on IntegriCloud