diff options
author | mav <mav@FreeBSD.org> | 2010-05-22 07:32:47 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2010-05-22 07:32:47 +0000 |
commit | 810a32455d43efc2de222a2109f0691456aa7645 (patch) | |
tree | fc393fbaa9f0ab9d5b7cfb97523cd0a46611a3a6 /sys/dev/ahci/ahci.c | |
parent | d785fc2581eeec9fca9e7dab9ed758fe7af8fed1 (diff) | |
download | FreeBSD-src-810a32455d43efc2de222a2109f0691456aa7645.zip FreeBSD-src-810a32455d43efc2de222a2109f0691456aa7645.tar.gz |
Report ATA/SATA channel number to NewBus at location string.
Diffstat (limited to 'sys/dev/ahci/ahci.c')
-rw-r--r-- | sys/dev/ahci/ahci.c | 12 |
1 files changed, 12 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 = { |