summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authortakawata <takawata@FreeBSD.org>2004-03-31 17:27:19 +0000
committertakawata <takawata@FreeBSD.org>2004-03-31 17:27:19 +0000
commitfbe8ede40b283fa7426887730943b019755f6918 (patch)
treea1a37dd2d4836bdacf7b9323796c609eaa816288 /sys/dev
parentfd0c34e87b18dc4d46cef5a65516486dd7f7090c (diff)
downloadFreeBSD-src-fbe8ede40b283fa7426887730943b019755f6918.zip
FreeBSD-src-fbe8ede40b283fa7426887730943b019755f6918.tar.gz
Add ACPI path in location string for ACPI namespace aware PCI device.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi_pci.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_pci.c b/sys/dev/acpica/acpi_pci.c
index 4b72925..a900e56 100644
--- a/sys/dev/acpica/acpi_pci.c
+++ b/sys/dev/acpica/acpi_pci.c
@@ -65,6 +65,10 @@ static int acpi_pci_probe(device_t dev);
static int acpi_pci_attach(device_t dev);
static int acpi_pci_read_ivar(device_t dev, device_t child, int which,
uintptr_t *result);
+static int acpi_pci_child_location_str_method(device_t cbdev,
+ device_t child, char *buf, size_t buflen);
+
+
#if 0
static int acpi_pci_set_powerstate_method(device_t dev, device_t child,
int state);
@@ -99,7 +103,7 @@ static device_method_t acpi_pci_methods[] = {
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
DEVMETHOD(bus_child_pnpinfo_str, pci_child_pnpinfo_str_method),
- DEVMETHOD(bus_child_location_str, pci_child_location_str_method),
+ DEVMETHOD(bus_child_location_str, acpi_pci_child_location_str_method),
/* PCI interface */
DEVMETHOD(pci_read_config, pci_read_config_method),
@@ -140,6 +144,21 @@ acpi_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
return(pci_read_ivar(dev, child, which, result));
}
+static int
+acpi_pci_child_location_str_method(device_t cbdev, device_t child, char *buf,
+ size_t buflen)
+{
+ struct acpi_pci_devinfo *dinfo = device_get_ivars(child);
+ int status;
+ pci_child_location_str_method(cbdev, child, buf, buflen);
+
+ if(dinfo->ap_handle){
+ strlcat(buf, " path=", buflen);
+ strlcat(buf, acpi_name(dinfo->ap_handle), buflen);
+ }
+ return (0);
+}
+
#if 0
/*
* PCI power manangement
OpenPOWER on IntegriCloud