From owner-freebsd-hardware@FreeBSD.ORG Thu May 25 20:20:45 2006 Return-Path: X-Original-To: freebsd-hardware@freebsd.org Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CDB216C211 for ; Thu, 25 May 2006 20:20:45 +0000 (UTC) (envelope-from rand@meridian-enviro.com) Received: from newman.meridian-enviro.com (newman.meridian-enviro.com [207.109.235.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F34343D5A for ; Thu, 25 May 2006 20:20:44 +0000 (GMT) (envelope-from rand@meridian-enviro.com) X-Envelope-To: Received: from delta.meridian-enviro.com (delta.meridian-enviro.com [10.10.10.43]) by newman.meridian-enviro.com (8.13.1/8.13.1) with ESMTP id k4PKKivH090024 for ; Thu, 25 May 2006 15:20:44 -0500 (CDT) (envelope-from rand@meridian-enviro.com) Date: Thu, 25 May 2006 15:20:44 -0500 Message-ID: <87slmxvotf.wl%rand@meridian-enviro.com> From: "Douglas K. Rand" To: freebsd-hardware@freebsd.org User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV 0.88/1484/Thu May 25 10:19:23 2006 on newman.meridian-enviro.com X-Virus-Status: Clean Subject: puc & SIIG & Baud Rates 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, 25 May 2006 20:20:50 -0000 I'm using a SIIG CyberPro PCI 4S serial card that has a 18.432 MHz crystal on board rather than the if not standard, VERY common 1.8432 MHz crystal. After talking with SIIG support it seems that most of their cards use the 10x crystal which cause baud rate mismatches. I found the hint I needed from a (probably private) message by Kirk McKusick that was included in this post to freebsd-stable: http://lists.freebsd.org/pipermail/freebsd-stable/2005-March/013183.html Here's the pciconf details for the card: puc0@pci0:13:0: class=0x070006 card=0x2051131f chip=0x95011415 rev=0x00 hdr=0x00 vendor = 'Oxford Semiconductor Ltd' device = 'OX16PCI954 Quad UART' class = simple comms subclass = UART none1@pci0:13:1: class=0x068000 card=0x0000131f chip=0x95101415 rev=0x00 hdr=0x00 vendor = 'Oxford Semiconductor Ltd' device = 'OX16PCI954 PCI Interface (disabled)' class = bridge I tried the following patch to pucdata.c for the card: --- pucdata.c-orig Thu May 25 15:11:08 2006 +++ pucdata.c Thu May 25 15:11:34 2006 @@ -623,14 +623,14 @@ /* SIIG Cyber 4S PCI 16C650 (20x family): 4S */ { "SIIG Cyber 4S PCI 16C650 (20x family)", { 0x131f, 0x2051, 0, 0 }, { 0xffff, 0xffff, 0, 0 }, { - { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, - { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ }, - { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ }, - { PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ }, + { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 10 }, + { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ * 10 }, + { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ * 10 }, + { PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ * 10 }, }, }, /* SIIG Cyber 4S PCI 16C850 (20x family): 4S */ { "SIIG Cyber 4S PCI 16C850 (20x family)", which didn't do anything to help me. I finally realized that pciconf -lv is reporting the chip details, not the card details. So, I tried this patch: --- pucdata.c-orig Thu May 25 15:11:08 2006 +++ pucdata.c Thu May 25 15:11:34 2006 @@ -858,14 +858,14 @@ /* Oxford Semiconductor OX16PCI954 PCI UARTs */ { "Oxford Semiconductor OX16PCI954 UARTs", { 0x1415, 0x9501, 0, 0 }, { 0xffff, 0xffff, 0, 0 }, { - { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, - { PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ }, - { PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ }, - { PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ }, + { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 10 }, + { PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ * 10 }, + { PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ * 10 }, + { PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ * 10 }, }, }, /* Oxford Semiconductor OX16PCI954 PCI UARTs */ { "Oxford Semiconductor OX16PCI954 UARTs", And this patch makes the card work for me. I also expect that this patch will break all other vendors that use this Oxford chip on cards with the 1.8432 MHz crystal. I was wondering if anybody might have ideas on a better approach for the patch that will fix it for the card. I have a query into SIIG tech support for a list of their cards (and the device IDs) that use the 18.432 crystal.