From owner-freebsd-hardware@FreeBSD.ORG Thu May 26 16:35:54 2011 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A23E1065675; Thu, 26 May 2011 16:35:54 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 0B4688FC20; Thu, 26 May 2011 16:35:53 +0000 (UTC) Received: from sa-nc-common-178.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.4/8.14.4) with ESMTP id p4QGZmsp056235 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 26 May 2011 09:35:53 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <20110526134211.GB9481@titania.njm.me.uk> Date: Thu, 26 May 2011 09:35:43 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <20110522110002.GB91694@titania.njm.me.uk> <201105241610.49930.jhb@freebsd.org> <20110524215232.GB92553@titania.njm.me.uk> <201105250946.45653.jhb@freebsd.org> <803C09E5-8E10-4289-A8B3-952E8A72C7A1@xcllnt.net> <20110526134211.GB9481@titania.njm.me.uk> To: "N.J. Mann" X-Mailer: Apple Mail (2.1084) Cc: John Baldwin , freebsd-hardware@FreeBSD.org Subject: Re: Sunix 4056A PCI 4 port RS-232 card - only 2 ports configured X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 16:35:54 -0000 On May 26, 2011, at 6:42 AM, N.J. Mann wrote: *snip* >> For you, the first thing is to see whether the UART ports work >> if you tweak the probe functions, like so: >> >> Index: uart_dev_ns8250.c >> =================================================================== >> --- uart_dev_ns8250.c (revision 222217) >> +++ uart_dev_ns8250.c (working copy) >> @@ -243,7 +243,7 @@ >> if (val & 0x30) >> return (ENXIO); >> val = uart_getreg(bas, REG_MCR); >> - if (val & 0xe0) >> + if (val & 0xa0) >> return (ENXIO); >> >> return (0); > > I tried this and the result is that ports 3 and 4 now attach okay. > However, the baud rate of these two is wrong. If I select 9600 they > actually send and receive at 1200, i.e. eight times slower. The speed > setting for the first two ports is correct. (I checked all four ports at > 9600, 38400 and 115200.) See John's email for the baudrate issue. >> Secondly, I'd like to know the vendor of the Quad-port UART. Either >> it's Sunix's own implementation (this seems to be the case), or they >> simply OEM someone else's. In any case: I'd like to see the datasheet >> of the ASIC so as to understand the meaning/function of the bit. > > I took the card out of the PC to see exactly what is on it. There are > three LSI chips, plus four RS-232 interface chips. The largest of the > LSI chips is a SUN1889 and it appears to connect to ports 1 and 2, and > to the PCI bus. The other two LSI chips are both SUN1699. The first of > these seems to be for port 3 and the second for port 4. I tried finding > data sheets for these chips on the web, but all I could find was > marketing leaflets for various single- and multi-port RS-232 and RS-422 > interface cards. Perhaps you will have better luck in searching than I > did. Thanks! This what really useful. It seems that the SUN1699 has MCR bit 6 set by default or it's even hardwired as 1. There have been various reports on the FreeBSD mailing lists relating to the SUN1699 and how uart(4) doesn't attach due to the MCR having a value of 0x40. Looking at the Sunix driver for Linux I cannot see any reference to this bit at all. The code does not mask it out or force it to 1 either. So, from what I can tell, it has absolutely no meaning. So, I'll change FreeBSD to just ignore this bit. There's even an open PR for this: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/129663 Thanks a lot of working with us! -- Marcel Moolenaar marcel@xcllnt.net