Date: Sat, 30 May 2015 16:30:52 +0000 (UTC) From: Luiz Otavio O Souza <loos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283773 - head/sys/dev/uart Message-ID: <201505301630.t4UGUqqv086637@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: loos Date: Sat May 30 16:30:51 2015 New Revision: 283773 URL: https://svnweb.freebsd.org/changeset/base/283773 Log: Actually check the DTS node value to enable the uart quirks. Without this fix, you cannot disable the quirks by setting it to 0, just the presence of the FDT node was enough to enable it. Modified: head/sys/dev/uart/uart_dev_ns8250.c Modified: head/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.c Sat May 30 16:00:33 2015 (r283772) +++ head/sys/dev/uart/uart_dev_ns8250.c Sat May 30 16:30:51 2015 (r283773) @@ -416,10 +416,10 @@ ns8250_bus_attach(struct uart_softc *sc) * has broken txfifo. */ node = ofw_bus_get_node(sc->sc_dev); - if ((OF_getprop(node, "busy-detect", &cell, sizeof(cell))) > 0) - ns8250->busy_detect = 1; - if ((OF_getprop(node, "broken-txfifo", &cell, sizeof(cell))) > 0) - broken_txfifo = 1; + if ((OF_getencprop(node, "busy-detect", &cell, sizeof(cell))) > 0) + ns8250->busy_detect = cell ? 1 : 0; + if ((OF_getencprop(node, "broken-txfifo", &cell, sizeof(cell))) > 0) + broken_txfifo = cell ? 1 : 0; #endif bas = &sc->sc_bas;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505301630.t4UGUqqv086637>