From owner-svn-src-stable-8@FreeBSD.ORG Mon May 24 11:01:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60CD9106566C; Mon, 24 May 2010 11:01:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5030C8FC0C; Mon, 24 May 2010 11:01:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4OB1vaV079916; Mon, 24 May 2010 11:01:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4OB1vVC079909; Mon, 24 May 2010 11:01:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005241101.o4OB1vVC079909@svn.freebsd.org> From: Alexander Motin Date: Mon, 24 May 2010 11:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208492 - in stable/8/sys/dev: ahci ata mvs siis X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2010 11:01:57 -0000 Author: mav Date: Mon May 24 11:01:56 2010 New Revision: 208492 URL: http://svn.freebsd.org/changeset/base/208492 Log: MFC r208410: Report ATA/SATA channel number to NewBus at location string. Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ata/ata-pci.c stable/8/sys/dev/ata/ata-pci.h stable/8/sys/dev/mvs/mvs_pci.c stable/8/sys/dev/mvs/mvs_soc.c stable/8/sys/dev/siis/siis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Mon May 24 10:54:50 2010 (r208491) +++ stable/8/sys/dev/ahci/ahci.c Mon May 24 11:01:56 2010 (r208492) @@ -774,6 +774,16 @@ ahci_print_child(device_t dev, device_t 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), @@ -786,6 +796,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 = { @@ -805,6 +816,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 = { Modified: stable/8/sys/dev/ata/ata-pci.c ============================================================================== --- stable/8/sys/dev/ata/ata-pci.c Mon May 24 10:54:50 2010 (r208491) +++ stable/8/sys/dev/ata/ata-pci.c Mon May 24 11:01:56 2010 (r208492) @@ -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 } }; Modified: stable/8/sys/dev/ata/ata-pci.h ============================================================================== --- stable/8/sys/dev/ata/ata-pci.h Mon May 24 10:54:50 2010 (r208491) +++ stable/8/sys/dev/ata/ata-pci.h Mon May 24 11:01:56 2010 (r208492) @@ -502,6 +502,8 @@ int ata_pci_write_ivar(device_t dev, dev 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,_m 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) = { \ Modified: stable/8/sys/dev/mvs/mvs_pci.c ============================================================================== --- stable/8/sys/dev/mvs/mvs_pci.c Mon May 24 10:54:50 2010 (r208491) +++ stable/8/sys/dev/mvs/mvs_pci.c Mon May 24 11:01:56 2010 (r208492) @@ -484,6 +484,16 @@ mvs_print_child(device_t dev, device_t c 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), @@ -495,6 +505,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 } }; Modified: stable/8/sys/dev/mvs/mvs_soc.c ============================================================================== --- stable/8/sys/dev/mvs/mvs_soc.c Mon May 24 10:54:50 2010 (r208491) +++ stable/8/sys/dev/mvs/mvs_soc.c Mon May 24 11:01:56 2010 (r208492) @@ -415,6 +415,16 @@ mvs_print_child(device_t dev, device_t c 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), @@ -427,6 +437,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 = { Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Mon May 24 10:54:50 2010 (r208491) +++ stable/8/sys/dev/siis/siis.c Mon May 24 11:01:56 2010 (r208492) @@ -400,6 +400,16 @@ siis_print_child(device_t dev, device_t 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), @@ -412,6 +422,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 = {