Date: Mon, 19 May 2014 09:26:33 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266434 - stable/9/sys/dev/uart Message-ID: <201405190926.s4J9QXqR082693@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Mon May 19 09:26:32 2014 New Revision: 266434 URL: http://svnweb.freebsd.org/changeset/base/266434 Log: MFC: r253654 Set the device description after we call uart_probe(). In uart_probe() we call device-specific probe functions, which can (and typically will) set the device description based on low-level device probe information. In the end we never actually used the device description that we so carefully maintained in the PCI match table. By setting the device description after we call uart_probe(), we'll print the more user- friendly description by default. Modified: stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/9/sys/dev/uart/uart_bus_pci.c Mon May 19 07:49:13 2014 (r266433) +++ stable/9/sys/dev/uart/uart_bus_pci.c Mon May 19 09:26:32 2014 (r266434) @@ -164,6 +164,7 @@ uart_pci_probe(device_t dev) { struct uart_softc *sc; const struct pci_id *id; + int result; sc = device_get_softc(dev); @@ -176,9 +177,14 @@ uart_pci_probe(device_t dev) return (ENXIO); match: + result = uart_bus_probe(dev, 0, id->rclk, id->rid, 0); + /* Bail out on error. */ + if (result > 0) + return (result); + /* Set/override the device description. */ if (id->desc) device_set_desc(dev, id->desc); - return (uart_bus_probe(dev, 0, id->rclk, id->rid, 0)); + return (result); } DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, NULL, NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405190926.s4J9QXqR082693>