Date: Thu, 26 May 2011 09:35:43 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: "N.J. Mann" <njm@njm.me.uk> Cc: John Baldwin <jhb@FreeBSD.org>, freebsd-hardware@FreeBSD.org Subject: Re: Sunix 4056A PCI 4 port RS-232 card - only 2 ports configured Message-ID: <EBD3B0ED-711D-4E0F-8109-9C3AC3F52279@xcllnt.net> In-Reply-To: <20110526134211.GB9481@titania.njm.me.uk> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EBD3B0ED-711D-4E0F-8109-9C3AC3F52279>