From owner-freebsd-stable@FreeBSD.ORG Tue Aug 16 20:37:35 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 C0C7C1065680; Tue, 16 Aug 2011 20:37:35 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id A25818FC16; Tue, 16 Aug 2011 20:37:35 +0000 (UTC) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 69C4813EB2; Tue, 16 Aug 2011 13:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1313527055; bh=ZlDdj2pqbMzUDJklO0LSOYV6MB7rQU57e/5RmMdoLM8=; h=Message-ID:Date:From:Reply-To:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=gY2aTO7Z65z8qWGrM3R7IAJ/mRb5HiXGdhXZevg8SvacTVMiVG8BCZKCx14m4bJLI yQQpwYIV7YjeUroaZ7aiQtzkV5xLeatB2OqS65smeFaqLEAUprhtLJwPh2ntfiLS5y dt8E2fVrWqqgIUCkjekV8gJT0fYDx9dbNQdUCN4g= Message-ID: <4E4AD50E.6050906@delphij.net> Date: Tue, 16 Aug 2011 13:37:34 -0700 From: Xin LI Organization: The FreeBSD Project MIME-Version: 1.0 To: Yuri References: <4E4A0C81.7020501@rawbw.com> <4E4A20BE.3060603@delphij.net> <4E4A3788.3030605@rawbw.com> <201108161157.20890.jhb@freebsd.org> <4E4ACAAD.3030506@rawbw.com> In-Reply-To: <4E4ACAAD.3030506@rawbw.com> OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: multipart/mixed; boundary="------------060306060307040906060005" Cc: d@delphij.net, freebsd-stable@freebsd.org, John Baldwin Subject: Re: How to use unrecognized COM port card? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net 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 20:37:35 -0000 This is a multi-part message in MIME format. --------------060306060307040906060005 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 08/16/11 12:53, Yuri wrote: > On 08/16/2011 08:57, John Baldwin wrote: >> 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: > > John, > > I did what you suggested: puc0: port > 0xe880-0xe887,0xe800-0xe807 irq 17 at device 1.0 on pci8 > > But it doesn't show up as a serial device and tty. I found a datasheet: http://wch-ic.com/download/down.asp?id=116 (English) and http://winchiphead.com/download/CH352/CH352DS1.PDF (Chinese) And I think John's patch is right, I've added a new PCI ID for it though, found from the datasheet. Did you have uart(4) in your kernel (remove my old patch)? Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBCAAGBQJOStUOAAoJEATO+BI/yjfBSw0IANPaoND+0Xa2QtueAxI8Qa42 V86MiUnaZopRb0coiWf8dQNk+nIlayVuFstC9+77zC9NEEu1O7Mp8T4n2Bx2N7WP jtsevUnLJq6lIyo0jYRTf4x84eYd1VDBduHqsWbI0B7aMArgfNtHvPV0qUD9Emrn 4yR6I3/tmO3sX3+cWcggYC4s3DIm7XidiyT/6lcWilsmy2QkQlw00HoAkoKl0V4m DBkKHkmOB2oTUYadpBOKCt6HvdI29xWYF+1zN/sE0B3XwTy+Q1pp4Uq5KiBUyJi3 tNF533Z7COh/mog/Z9cpGpLSRJpWQgI2uCY7gAHZRAMT2+7k1AqkdNPWTJPXoCk= =CcI6 -----END PGP SIGNATURE----- --------------060306060307040906060005 Content-Type: text/plain; name="puc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="puc.diff" Index: sys/dev/puc/pucdata.c =================================================================== --- sys/dev/puc/pucdata.c (revision 224912) +++ sys/dev/puc/pucdata.c (working copy) @@ -862,6 +862,20 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_syba }, + { + 0x4348, 0x3253, 0x4348, 0x3253, + "WinChipHead Dual Port RS-232", + DEFAULT_RCLK, + PUC_PORT_2S, 0x10, 4, 0, + }, + + { + 0x4348, 0x5053, 0x4348, 0x5053, + "WinChipHead RS-232 and Printer port", + DEFAULT_RCLK, + PUC_PORT_1S1P, 0x10, 4, 0, + }, + { 0x6666, 0x0001, 0xffff, 0, "Decision Computer Inc, PCCOM 4-port serial", DEFAULT_RCLK, --------------060306060307040906060005--