From owner-freebsd-questions@FreeBSD.ORG Sat Mar 24 18:36:09 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81BA916A400 for ; Sat, 24 Mar 2007 18:36:09 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.175]) by mx1.freebsd.org (Postfix) with ESMTP id 6B27013C455 for ; Sat, 24 Mar 2007 18:36:09 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin04-en2 [10.13.10.149]) by smtpout.mac.com (Xserve/smtpout05/MantshX 4.0) with ESMTP id l2OIa9a9017825; Sat, 24 Mar 2007 11:36:09 -0700 (PDT) Received: from [192.168.1.2] (c-24-6-177-228.hsd1.ca.comcast.net [24.6.177.228]) (authenticated bits=0) by mac.com (Xserve/smtpin04/MantshX 4.0) with ESMTP id l2OIa7qJ024199 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 24 Mar 2007 11:36:08 -0700 (PDT) In-Reply-To: <200703241241.l2OCfk8q089451@lava.sentex.ca> References: <200703240449.l2O4n159087350@lava.sentex.ca> <7FF1D403-84EB-4FD3-A183-46BBC484F9D3@mac.com> <200703241241.l2OCfk8q089451@lava.sentex.ca> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <17B8B4E4-CF41-4BFD-B228-4AEAA179A2FB@mac.com> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Sat, 24 Mar 2007 11:35:29 -0700 To: Mike Tancsa X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: freebsd-questions@freebsd.org Subject: Re: fixing a PUC / uart speed issue 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: Sat, 24 Mar 2007 18:36:09 -0000 On Mar 24, 2007, at 5:41 AM, Mike Tancsa wrote: > At 02:10 AM 3/24/2007, Marcel Moolenaar wrote: > >> Try changing the frequency from COM_FREQ to (4 * COM_FREQ). The >> .... >> HTH, > > Thanks, it fixed it! BTW, would this be for all such cards with > this PCI ID ? If so, should I file a PR ? If not, apart from > keeping a private set of patches, whats the best way to work around > this with each cvsup / buildworld ? Well, the clock frequency used to feed the UART is really a property of the add-in card, not of the chipset (Oxford in this case). While many PCI cards have the vendor ID and device ID of the Oxford chipset (and its manufacturer), it doesn't really help us to identify the particular add-in card. IIRC, the sub-vendor and sub-device IDs are all zeroes in your case. I doubt that we can use that to match the actual add-in card and therefore use a 4x clock. Other cards exist that are based on the Oxford chipset that use different clocks and if they too have a sub-device or sub-vendor ID of all zeroes, then there's still a conflict. Maybe it's worthwhile to detect the clock frequency by programming the UART for a fixed baudrate and then checking (using loopback) how fast characters are being transmitted. Based on that it should be possible to determine the right frequency. Alternatively, we could also just use hints. In any case: changing the entry in puc(4) will likely break some other card, so that not a good idea. FYI, -- Marcel Moolenaar xcllnt@mac.com