From owner-freebsd-stable@FreeBSD.ORG Tue Aug 16 15:57:22 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F046106566C for ; Tue, 16 Aug 2011 15:57:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 32B7F8FC1F for ; Tue, 16 Aug 2011 15:57:22 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CDB0246B06; Tue, 16 Aug 2011 11:57:21 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6AC688A02E; Tue, 16 Aug 2011 11:57:21 -0400 (EDT) From: John Baldwin To: freebsd-stable@freebsd.org Date: Tue, 16 Aug 2011 11:57:20 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <4E4A0C81.7020501@rawbw.com> <4E4A20BE.3060603@delphij.net> <4E4A3788.3030605@rawbw.com> In-Reply-To: <4E4A3788.3030605@rawbw.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201108161157.20890.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 16 Aug 2011 11:57:21 -0400 (EDT) Cc: Yuri , d@delphij.net, Xin LI Subject: Re: How to use unrecognized COM port card? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2011 15:57:22 -0000 On Tuesday, August 16, 2011 5:25:28 am Yuri wrote: > On 08/16/2011 00:48, Xin LI wrote: > > A wild guess... (You gotta to provide more details rather than just PCI > > IDs). > > > > My guess is that it's using these chips: > > > > http://www.winchiphead.com/product/ch365detail.htm > > http://www.winchiphead.com/product/ch353detail.htm > > > > It didn't talked about possible cards' configuration so I used BAR0, > > which could be 0x14, 0x18, etc. > > Actually, the main chip there is CH352L. Plus there are two more chips > ST75185C, one per COM port. > > Your patch made this pci device to connect to uart driver: uart2@pci0:8:1:0. > > uart2: <16550 or compatible> port 0xe880-0xe887,0xe800-0xe807 irq 17 at > device 1.0 on pci8 > uart2: [FILTER] > > Also new devices showed up: > /dev/cuau2 > /dev/cuau2.init > /dev/cuau2.lock > /dev/ttyu2 > /dev/ttyu2.init > /dev/ttyu2.lock > > cuau2 is probably the same as COM port. I don't have an easy way to > check now. > I believe adding another entry with 0x14 would add the second COM port. For multiport devices you will want to add an entry to sys/dev/puc/pucdata.c and use the puc driver instead of patching uart directly. Perhaps this: Index: pucdata.c =================================================================== --- pucdata.c (revision 224898) +++ pucdata.c (working copy) @@ -862,6 +862,13 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_syba }, + { + 0x4348, 0x3253, 0xffff, 0, + "WinChipHead Dual Port RS-232", + DEFAULT_RCLK, + PUC_PORT_2S, 0x10, 4, 0, + }, + { 0x6666, 0x0001, 0xffff, 0, "Decision Computer Inc, PCCOM 4-port serial", DEFAULT_RCLK, -- John Baldwin