Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2011 16:10:16 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r222501 - stable/8/sys/dev/uart
Message-ID:  <201105301610.p4UGAGmm084214@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Mon May 30 16:10:15 2011
New Revision: 222501
URL: http://svn.freebsd.org/changeset/base/222501

Log:
  MFC r222317:
  	Ignore MCR[6] during the probe to fix a false negative.
  
  PR:		kern/129663

Modified:
  stable/8/sys/dev/uart/uart_dev_ns8250.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/uart/uart_dev_ns8250.c
==============================================================================
--- stable/8/sys/dev/uart/uart_dev_ns8250.c	Mon May 30 15:48:28 2011	(r222500)
+++ stable/8/sys/dev/uart/uart_dev_ns8250.c	Mon May 30 16:10:15 2011	(r222501)
@@ -242,8 +242,14 @@ ns8250_probe(struct uart_bas *bas)
 	val = uart_getreg(bas, REG_IIR);
 	if (val & 0x30)
 		return (ENXIO);
+	/*
+	 * Bit 6 of the MCR (= 0x40) appears to be 1 for the Sun1699
+	 * chip, but otherwise doesn't seem to have a function. In
+	 * other words, uart(4) works regardless. Ignore that bit so
+	 * the probe succeeds.
+	 */
 	val = uart_getreg(bas, REG_MCR);
-	if (val & 0xe0)
+	if (val & 0xa0)
 		return (ENXIO);
 
 	return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105301610.p4UGAGmm084214>