From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 08:47:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DEA7106564A; Mon, 24 Oct 2011 08:47:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CFF18FC15; Mon, 24 Oct 2011 08:47:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9O8lO7u080732; Mon, 24 Oct 2011 08:47:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9O8lOUx080728; Mon, 24 Oct 2011 08:47:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201110240847.p9O8lOUx080728@svn.freebsd.org> From: Alexander Motin Date: Mon, 24 Oct 2011 08:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226680 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 08:47:24 -0000 Author: mav Date: Mon Oct 24 08:47:23 2011 New Revision: 226680 URL: http://svn.freebsd.org/changeset/base/226680 Log: Some dmesg cosmetics: - for the legacy PCI ATA channels move channel number out of the device description, same as it is for ahci(4), siis(4) and mvs(4); - add device description for the ISA ATA channels. Modified: head/sys/dev/ata/ata-isa.c head/sys/dev/ata/ata-pci.c head/sys/dev/ata/ata-pci.h Modified: head/sys/dev/ata/ata-isa.c ============================================================================== --- head/sys/dev/ata/ata-isa.c Mon Oct 24 07:37:01 2011 (r226679) +++ head/sys/dev/ata/ata-isa.c Mon Oct 24 08:47:23 2011 (r226680) @@ -92,6 +92,7 @@ ata_isa_probe(device_t dev) bus_release_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, ctlio); bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io); + device_set_desc(dev, "ATA channel"); return (ata_probe(dev)); } Modified: head/sys/dev/ata/ata-pci.c ============================================================================== --- head/sys/dev/ata/ata-pci.c Mon Oct 24 07:37:01 2011 (r226679) +++ head/sys/dev/ata/ata-pci.c Mon Oct 24 08:47:23 2011 (r226680) @@ -545,6 +545,19 @@ ata_pci_dmafini(device_t dev) } int +ata_pci_print_child(device_t dev, device_t child) +{ + int retval; + + retval = bus_print_child_header(dev, child); + retval += printf(" at channel %d", + (int)(intptr_t)device_get_ivars(child)); + retval += bus_print_child_footer(dev, child); + + return (retval); +} + +int ata_pci_child_location_str(device_t dev, device_t child, char *buf, size_t buflen) { @@ -574,6 +587,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_print_child, ata_pci_print_child), DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), { 0, 0 } @@ -594,12 +608,10 @@ MODULE_DEPEND(atapci, ata, 1, 1, 1); static int ata_pcichannel_probe(device_t dev) { - char buffer[32]; if ((intptr_t)device_get_ivars(dev) < 0) return (ENXIO); - sprintf(buffer, "ATA channel %d", (int)(intptr_t)device_get_ivars(dev)); - device_set_desc_copy(dev, buffer); + device_set_desc(dev, "ATA channel"); return ata_probe(dev); } Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Mon Oct 24 07:37:01 2011 (r226679) +++ head/sys/dev/ata/ata-pci.h Mon Oct 24 08:47:23 2011 (r226680) @@ -549,6 +549,7 @@ 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_print_child(device_t dev, device_t child); 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); @@ -601,6 +602,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_print_child, ata_pci_print_child), \ DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), \ { 0, 0 } \ }; \