summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ahci/ahci.c12
-rw-r--r--sys/dev/ata/ata-pci.c11
-rw-r--r--sys/dev/ata/ata-pci.h3
-rw-r--r--sys/dev/mvs/mvs_pci.c11
-rw-r--r--sys/dev/mvs/mvs_soc.c11
-rw-r--r--sys/dev/siis/siis.c11
6 files changed, 59 insertions, 0 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c
index 2cd40a2..ba52105 100644
--- a/sys/dev/ahci/ahci.c
+++ b/sys/dev/ahci/ahci.c
@@ -778,6 +778,16 @@ ahci_print_child(device_t dev, device_t child)
return (retval);
}
+static int
+ahci_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);
+}
+
devclass_t ahci_devclass;
static device_method_t ahci_methods[] = {
DEVMETHOD(device_probe, ahci_probe),
@@ -790,6 +800,7 @@ static device_method_t ahci_methods[] = {
DEVMETHOD(bus_release_resource, ahci_release_resource),
DEVMETHOD(bus_setup_intr, ahci_setup_intr),
DEVMETHOD(bus_teardown_intr,ahci_teardown_intr),
+ DEVMETHOD(bus_child_location_str, ahci_child_location_str),
{ 0, 0 }
};
static driver_t ahci_driver = {
@@ -809,6 +820,7 @@ static device_method_t ahci_ata_methods[] = {
DEVMETHOD(bus_release_resource, ahci_release_resource),
DEVMETHOD(bus_setup_intr, ahci_setup_intr),
DEVMETHOD(bus_teardown_intr,ahci_teardown_intr),
+ DEVMETHOD(bus_child_location_str, ahci_child_location_str),
{ 0, 0 }
};
static driver_t ahci_ata_driver = {
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index 5271073..fea7c96 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -544,6 +544,16 @@ ata_pci_dmafini(device_t dev)
ata_dmafini(dev);
}
+int
+ata_pci_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 ata_pci_methods[] = {
/* device interface */
DEVMETHOD(device_probe, ata_pci_probe),
@@ -564,6 +574,7 @@ static device_method_t ata_pci_methods[] = {
DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr),
DEVMETHOD(pci_read_config, ata_pci_read_config),
DEVMETHOD(pci_write_config, ata_pci_write_config),
+ DEVMETHOD(bus_child_location_str, ata_pci_child_location_str),
{ 0, 0 }
};
diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h
index 1378f87..7fa7644 100644
--- a/sys/dev/ata/ata-pci.h
+++ b/sys/dev/ata/ata-pci.h
@@ -502,6 +502,8 @@ int ata_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
uint32_t ata_pci_read_config(device_t dev, device_t child, int reg, int width);
void ata_pci_write_config(device_t dev, device_t child, int reg,
uint32_t val, int width);
+int ata_pci_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen);
struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags);
int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r);
int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep);
@@ -550,6 +552,7 @@ static device_method_t __CONCAT(dname,_methods)[] = { \
DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), \
DEVMETHOD(pci_read_config, ata_pci_read_config), \
DEVMETHOD(pci_write_config, ata_pci_write_config), \
+ DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), \
{ 0, 0 } \
}; \
static driver_t __CONCAT(dname,_driver) = { \
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 = {
diff --git a/sys/dev/siis/siis.c b/sys/dev/siis/siis.c
index 75eb26f..ee1c466 100644
--- a/sys/dev/siis/siis.c
+++ b/sys/dev/siis/siis.c
@@ -398,6 +398,16 @@ siis_print_child(device_t dev, device_t child)
return (retval);
}
+static int
+siis_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);
+}
+
devclass_t siis_devclass;
static device_method_t siis_methods[] = {
DEVMETHOD(device_probe, siis_probe),
@@ -410,6 +420,7 @@ static device_method_t siis_methods[] = {
DEVMETHOD(bus_release_resource, siis_release_resource),
DEVMETHOD(bus_setup_intr, siis_setup_intr),
DEVMETHOD(bus_teardown_intr,siis_teardown_intr),
+ DEVMETHOD(bus_child_location_str, siis_child_location_str),
{ 0, 0 }
};
static driver_t siis_driver = {
OpenPOWER on IntegriCloud