From owner-freebsd-current@FreeBSD.ORG Thu Dec 11 00:02:48 2008 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66BCC1065673 for ; Thu, 11 Dec 2008 00:02:48 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id E5CAA8FC1B for ; Thu, 11 Dec 2008 00:02:47 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from bb.ipt.ru ([194.62.233.89]) by services.ipt.ru with esmtp (Exim 4.54 (FreeBSD)) id 1LAZ0s-0006Rl-QQ; Thu, 11 Dec 2008 03:02:42 +0300 To: rea-fbsd@codelabs.ru References: <92804393@bb.ipt.ru> <26722819@bb.ipt.ru> From: Boris Samorodov Date: Thu, 11 Dec 2008 03:02:42 +0300 In-Reply-To: (Eygene Ryabinkin's message of "Wed\, 10 Dec 2008 18\:38\:00 +0300") Message-ID: <26719629@bb.ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-current@FreeBSD.org Subject: Re: Timeda 8-multiport adapter: only 2 ports available X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 00:02:48 -0000 Eygene Ryabinkin writes: > Boris, good day. > > Wed, Dec 10, 2008 at 05:13:48PM +0300, Boris Samorodov wrote: >> Boris Samorodov writes: >> >> > I've got a Sunix PCI Serial 8-channel Multiport adapter (Timedia chipset): >> > ----- >> > puc0@pci0:5:2:0: class=0x070002 card=0x40661409 chip=0x71681409 rev=0x01 hdr=0x00 >> > vendor = 'Timedia Technology Co Ltd' >> > device = '40371409 PCI / ISA Asynchronous UART Signal Chips Solution' >> >> Actually the card is 4066, while 4037 (according to pucdata.c) is indeed >> a dual-port card. May be the card is wrongly interpreted by the OS? > > pciconf just don't know about 4066, so is prints what it has in the > database. This is irrelevant to the driver -- it discovers the correct > chip with 8 ports: > >> > puc0: port 0xec00-0xec1f,0xe880-0xe88f,0xe800-0xe807,0xe480-0xe487,0xe400-0xe407,0xe080-0xe087 irq 18 at device 2.0 on pci5 >> > puc0: Reserved 0x20 bytes for rid 0x10 type 4 at 0xec00 >> > puc0: Reserved 0x10 bytes for rid 0x14 type 4 at 0xe880 >> > puc0: Reserved 0x8 bytes for rid 0x18 type 4 at 0xe800 >> > puc0: Reserved 0x8 bytes for rid 0x1c type 4 at 0xe480 >> > puc0: Reserved 0x8 bytes for rid 0x20 type 4 at 0xe400 >> > puc0: Reserved 0x8 bytes for rid 0x24 type 4 at 0xe080 >> > puc0: [FILTER] >> > uart4: <16550 or compatible> on puc0 >> > uart4: [FILTER] >> > uart4: fast interrupt >> > uart5: <16550 or compatible> on puc0 >> > uart5: [FILTER] >> > uart5: fast interrupt >> > ----- > > Judging by this output, the 6 ports that got their reservations at > dev/pci/pci.c are the ones that aren't recognized by uart. You may need > to add trace printfs to uart_puc_probe (uart_bus_puc.c) and to > uart_bus_probe (uart_core.c), just around the register resource > allocator. This should show what devices are passed to the probe > routines and which are rejected. Be sure to include 'rid' values to > your debug output to get the idea what ports we're speaking about. Seems that just the same card should work: http://lists.freebsd.org/pipermail/freebsd-stable/2008-May/042505.html I've added some diagnistic. But 'rid' is not what you want, I guess: ----- puc0: port 0xec00-0xec1f,0xe880-0xe88f,0xe800-0xe807,0xe480-0xe487,0xe400-0xe407,0xe080-0xe087 irq 18 at device 2.0 on pci5 puc0: Reserved 0x20 bytes for rid 0x10 type 4 at 0xec00 puc0: Reserved 0x10 bytes for rid 0x14 type 4 at 0xe880 puc0: Reserved 0x8 bytes for rid 0x18 type 4 at 0xe800 puc0: Reserved 0x8 bytes for rid 0x1c type 4 at 0xe480 puc0: Reserved 0x8 bytes for rid 0x20 type 4 at 0xe400 puc0: Reserved 0x8 bytes for rid 0x24 type 4 at 0xe080 puc0: [FILTER] uart4: uart_puc_probe: type = 1, error = 0 uart4: uart_puc_probe: probing for uart bus uart4: uart_bus_probe: Entering uart4: /usr/src/sys/dev/uart/uart_core.c:374: continue with rid=0x0 ns8250_bus_probe: entering ns8250_probe: entering ns8250_probe: got IIR register: 0x1 ns8250_probe: got MCR register: 0x0 ns8250_probe: no errors, exiting ns8250_bus_probe:656: continue ns8250_bus_probe:664: continue ns8250_bus_probe:749: Reset FIFOs ns8250_bus_probe:752: FIFO count=16 ns8250_bus_probe:792: no errors, exiting uart4: uart_bus_probe: Uart probe returned 0 uart4: uart_bus_probe: exiting uart4: uart_puc_probe: type = 1, error = 0 uart4: uart_puc_probe: probing for uart bus uart4: uart_bus_probe: Entering uart4: /usr/src/sys/dev/uart/uart_core.c:374: continue with rid=0x0 ns8250_bus_probe: entering ns8250_probe: entering ns8250_probe: got IIR register: 0xc1 ns8250_probe: got MCR register: 0x8 ns8250_probe: no errors, exiting ns8250_bus_probe:656: continue ns8250_bus_probe:664: continue ns8250_bus_probe:749: Reset FIFOs ns8250_bus_probe:752: FIFO count=16 ns8250_bus_probe:792: no errors, exiting uart4: uart_bus_probe: Uart probe returned 0 uart4: uart_bus_probe: exiting uart4: <16550 or compatible> on puc0 uart4: [FILTER] uart4: fast interrupt uart5: uart_puc_probe: type = 1, error = 0 uart5: uart_puc_probe: probing for uart bus uart5: uart_bus_probe: Entering uart5: /usr/src/sys/dev/uart/uart_core.c:374: continue with rid=0x0 ns8250_bus_probe: entering ns8250_probe: entering ns8250_probe: got IIR register: 0x1 ns8250_probe: got MCR register: 0x0 ns8250_probe: no errors, exiting ns8250_bus_probe:656: continue ns8250_bus_probe:664: continue ns8250_bus_probe:749: Reset FIFOs ns8250_bus_probe:752: FIFO count=16 ns8250_bus_probe:792: no errors, exiting uart5: uart_bus_probe: Uart probe returned 0 uart5: uart_bus_probe: exiting uart5: uart_puc_probe: type = 1, error = 0 uart5: uart_puc_probe: probing for uart bus uart5: uart_bus_probe: Entering uart5: /usr/src/sys/dev/uart/uart_core.c:374: continue with rid=0x0 ns8250_bus_probe: entering ns8250_probe: entering ns8250_probe: got IIR register: 0xc1 ns8250_probe: got MCR register: 0x8 ns8250_probe: no errors, exiting ns8250_bus_probe:656: continue ns8250_bus_probe:664: continue ns8250_bus_probe:749: Reset FIFOs ns8250_bus_probe:752: FIFO count=16 ns8250_bus_probe:792: no errors, exiting uart5: uart_bus_probe: Uart probe returned 0 uart5: uart_bus_probe: exiting uart5: <16550 or compatible> on puc0 uart5: [FILTER] uart5: fast interrupt uart6: uart_puc_probe: type = 1, error = 0 uart6: uart_puc_probe: probing for uart bus uart6: uart_bus_probe: Entering uart6: /usr/src/sys/dev/uart/uart_core.c:374: continue with rid=0x0 ns8250_bus_probe: entering ns8250_probe: entering ns8250_probe: got IIR register: 0x1 ns8250_probe: got MCR register: 0x40 ns8250_probe: got MCR wrong register, exiting with ENXIO ns8250_bus_probe:645: error at ns8250_probe(), exiting, returning 6 uart6: uart_bus_probe: Uart probe returned 6 uart6: uart_bus_probe: exiting uart6: uart_puc_probe: type = 1, error = 0 uart6: uart_puc_probe: probing for uart bus uart6: uart_bus_probe: Entering uart6: /usr/src/sys/dev/uart/uart_core.c:374: continue with rid=0x0 ns8250_bus_probe: entering ns8250_probe: entering ns8250_probe: got IIR register: 0x1 ns8250_probe: got MCR register: 0x40 ns8250_probe: got MCR wrong register, exiting with ENXIO ns8250_bus_probe:645: error at ns8250_probe(), exiting, returning 6 uart6: uart_bus_probe: Uart probe returned 6 uart6: uart_bus_probe: exiting uart6: uart_puc_probe: type = 1, error = 0 uart6: uart_puc_probe: probing for uart bus uart6: uart_bus_probe: Entering uart6: /usr/src/sys/dev/uart/uart_core.c:374: continue with rid=0x0 ns8250_bus_probe: entering ns8250_probe: entering ns8250_probe: got IIR register: 0x1 ns8250_probe: got MCR register: 0x40 ns8250_probe: got MCR wrong register, exiting with ENXIO ns8250_bus_probe:645: error at ns8250_probe(), exiting, returning 6 uart6: uart_bus_probe: Uart probe returned 6 uart6: uart_bus_probe: exiting uart6: uart_puc_probe: type = 1, error = 0 uart6: uart_puc_probe: probing for uart bus uart6: uart_bus_probe: Entering uart6: /usr/src/sys/dev/uart/uart_core.c:374: continue with rid=0x0 ns8250_bus_probe: entering ns8250_probe: entering ns8250_probe: got IIR register: 0x1 ns8250_probe: got MCR register: 0x40 ns8250_probe: got MCR wrong register, exiting with ENXIO ns8250_bus_probe:645: error at ns8250_probe(), exiting, returning 6 uart6: uart_bus_probe: Uart probe returned 6 uart6: uart_bus_probe: exiting uart6: uart_puc_probe: type = 1, error = 0 uart6: uart_puc_probe: probing for uart bus uart6: uart_bus_probe: Entering uart6: /usr/src/sys/dev/uart/uart_core.c:374: continue with rid=0x0 ns8250_bus_probe: entering ns8250_probe: entering ns8250_probe: got IIR register: 0x1 ns8250_probe: got MCR register: 0x40 ns8250_probe: got MCR wrong register, exiting with ENXIO ns8250_bus_probe:645: error at ns8250_probe(), exiting, returning 6 uart6: uart_bus_probe: Uart probe returned 6 uart6: uart_bus_probe: exiting uart6: uart_puc_probe: type = 1, error = 0 uart6: uart_puc_probe: probing for uart bus uart6: uart_bus_probe: Entering uart6: /usr/src/sys/dev/uart/uart_core.c:374: continue with rid=0x0 ns8250_bus_probe: entering ns8250_probe: entering ns8250_probe: got IIR register: 0x1 ns8250_probe: got MCR register: 0x40 ns8250_probe: got MCR wrong register, exiting with ENXIO ns8250_bus_probe:645: error at ns8250_probe(), exiting, returning 6 uart6: uart_bus_probe: Uart probe returned 6 uart6: uart_bus_probe: exiting ----- WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve