From owner-svn-src-head@FreeBSD.ORG Sat May 30 16:30:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C00F2E21; Sat, 30 May 2015 16:30:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADC1D1974; Sat, 30 May 2015 16:30:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4UGUqqx086638; Sat, 30 May 2015 16:30:52 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4UGUqqv086637; Sat, 30 May 2015 16:30:52 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505301630.t4UGUqqv086637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 30 May 2015 16:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283773 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2015 16:30:52 -0000 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;