From owner-svn-src-head@FreeBSD.ORG Thu May 26 17:02:56 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D2A2106564A; Thu, 26 May 2011 17:02:56 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EF968FC08; Thu, 26 May 2011 17:02:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QH2uII073179; Thu, 26 May 2011 17:02:56 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QH2u7R073177; Thu, 26 May 2011 17:02:56 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105261702.p4QH2u7R073177@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 26 May 2011 17:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222317 - head/sys/dev/uart X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 26 May 2011 17:02:56 -0000 Author: marcel Date: Thu May 26 17:02:56 2011 New Revision: 222317 URL: http://svn.freebsd.org/changeset/base/222317 Log: Ignore MCR[6] during the probe to fix a false negative. Bit 6 of the MCR register on the Sunix Sun1699 chip tends to be set but doesn't seem to have a function. That is, FreeBSD just works (provided the correct RCLK is used) regardless. PR: kern/129663 Diagnostics: Eygene Ryabinkin MFC after: 3 days 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 Thu May 26 16:59:42 2011 (r222316) +++ head/sys/dev/uart/uart_dev_ns8250.c Thu May 26 17:02:56 2011 (r222317) @@ -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);