summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-pci.c
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/ata/ata-pci.c
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/ata/ata-pci.c')
-rw-r--r--sys/dev/ata/ata-pci.c11
1 files changed, 11 insertions, 0 deletions
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 }
};
OpenPOWER on IntegriCloud