summaryrefslogtreecommitdiffstats
path: root/sys/dev/mvs
diff options
context:
space:
mode:
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