From owner-freebsd-questions@FreeBSD.ORG Mon Nov 17 00:40:14 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55CF31065691 for ; Mon, 17 Nov 2008 00:40:14 +0000 (UTC) (envelope-from phi@evilphi.com) Received: from mail.twinthornes.com (mail.twinthornes.com [65.75.198.147]) by mx1.freebsd.org (Postfix) with ESMTP id 17F9B8FC16 for ; Mon, 17 Nov 2008 00:40:13 +0000 (UTC) (envelope-from phi@evilphi.com) Received: from [10.9.70.100] (c-76-27-226-62.hsd1.or.comcast.net [76.27.226.62]) by mail.twinthornes.com (Postfix) with ESMTPSA id 2068C10 for ; Sun, 16 Nov 2008 16:40:13 -0800 (PST) Message-ID: <4920BD67.1040200@evilphi.com> Date: Sun, 16 Nov 2008 16:40:07 -0800 From: Darren Pilgrim User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <491EA102.8060400@evilphi.com> In-Reply-To: <491EA102.8060400@evilphi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: puc(4) not attaching to NM9845-based serial card in 6.3-p5 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2008 00:40:14 -0000 Darren Pilgrim wrote: > I have the following PCI, 4-port serial card: > > none2@pci6:2:0: class=0x070002 card=0x00041000 chip=0x98459710 rev=0x01 > hdr=0x00 > vendor = 'MosChip Semiconductors (Was: Netmos Technology)' > device = 'Nm9845 Parallel/Serial Port Adapter' > class = simple comms > subclass = UART > > This is supposedly supported by puc(4); however, I'm unable to get the > driver to attach to the card. I tried both uart+puc and sio+puc. In > all both case, the uart/sio drivers attach to only the serial port on > the motherboard. There are a number of hits on the mailing list > archives that discuss puc(4) not attaching to this device, but none > provide any conclusive answers. After much searching, I finally found a message from Marcel Moolenaar to freebsd-stable date 2008-05-06 regarding PCI serial cards working in 6.2 but not 6.3. The issue (and mine) were due to a problem with v1.51.2.3 of sys/dev/puc/pucdata.c and caused by the commit to add support for the six-port version of my card. The following change: --- pucdata.c.orig 2006-12-15 14:31:37.000000000 -0800 +++ pucdata.c 2008-11-16 15:34:50.000000000 -0800 @@ -946,7 +946,7 @@ /* NetMos 4S0P PCI: 4S, 0P */ { "NetMos NM9845 Quad UART", - { 0x9710, 0x9845, 0, 0x0014 }, + { 0x9710, 0x9845, 0, 0x0004 }, { 0xffff, 0xffff, 0, 0xffff }, { { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, Fixes the issue and I now have: # dmesg | egrep '(uart|puc)' Preloaded elf module "/boot/kernel/uart.ko" at 0xc08312c4. Preloaded elf module "/boot/kernel/puc.ko" at 0xc0831370. puc0: port 0x1060-0x1067,0x1058-0x105f,0x1050-0x1057,0 x1048-0x104f,0x1040-0x1047,0x1020-0x102f irq 18 at device 2.0 on pci6 puc: name: NetMos NM9845 Quad UART puc0: Reserved 0x8 bytes for rid 0x10 type 4 at 0x1060 puc0: Reserved 0x8 bytes for rid 0x14 type 4 at 0x1058 puc0: Reserved 0x8 bytes for rid 0x18 type 4 at 0x1050 puc0: Reserved 0x8 bytes for rid 0x1c type 4 at 0x1048 puc: Using uart0 puc: type 1, bar 10, offset 0 puc_alloc_resource: pdev 0xc4c37d60, looking for t 4, r 0 puc_alloc_resource: pdev 0xc4c37d60, looking for t 4, r 0 uart0: on puc0 puc_alloc_resource: pdev 0xc4c37d60, looking for t 4, r 0 puc_alloc_resource: pdev 0xc4c37d60, looking for t 1, r 0 puc: Using uart1 puc: type 1, bar 14, offset 0 puc_alloc_resource: pdev 0xc4c37ca0, looking for t 4, r 0 puc_alloc_resource: pdev 0xc4c37ca0, looking for t 4, r 0 uart1: <16950 or compatible> on puc0 puc_alloc_resource: pdev 0xc4c37ca0, looking for t 4, r 0 puc_alloc_resource: pdev 0xc4c37ca0, looking for t 1, r 0 puc: Using uart2 puc: type 1, bar 18, offset 0 puc_alloc_resource: pdev 0xc4c37be0, looking for t 4, r 0 puc_alloc_resource: pdev 0xc4c37be0, looking for t 4, r 0 uart2: <16550 or compatible> on puc0 puc_alloc_resource: pdev 0xc4c37be0, looking for t 4, r 0 puc_alloc_resource: pdev 0xc4c37be0, looking for t 1, r 0 puc: Using uart3 puc: type 1, bar 1c, offset 0 puc_alloc_resource: pdev 0xc4c37b20, looking for t 4, r 0 puc_alloc_resource: pdev 0xc4c37b20, looking for t 4, r 0 uart3: <16550 or compatible> on puc0 puc_alloc_resource: pdev 0xc4c37b20, looking for t 4, r 0 puc_alloc_resource: pdev 0xc4c37b20, looking for t 1, r 0 uart4: <16550 or compatible> port 0x3f8-0x3ff irq 4 on acpi0