svn commit: r283773 - head/sys/dev/uart

Luiz Otavio O Souza loos at FreeBSD.org
Sat May 30 16:30:52 UTC 2015


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;


More information about the svn-src-all mailing list