From owner-freebsd-bugs@FreeBSD.ORG Tue May 18 05:40:08 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91CA91065673 for ; Tue, 18 May 2010 05:40:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 665A78FC08 for ; Tue, 18 May 2010 05:40:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o4I5e892066479 for ; Tue, 18 May 2010 05:40:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o4I5e8kU066478; Tue, 18 May 2010 05:40:08 GMT (envelope-from gnats) Date: Tue, 18 May 2010 05:40:08 GMT Message-Id: <201005180540.o4I5e8kU066478@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Garrett Cooper Cc: Subject: Re: kern/146647: Some PCIe seral/parallel boards with ID 9901 9710 don't work X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Cooper List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 05:40:08 -0000 The following reply was made to PR kern/146647; it has been noted by GNATS. From: Garrett Cooper To: Tommy Johnson Cc: bug-followup@freebsd.org Subject: Re: kern/146647: Some PCIe seral/parallel boards with ID 9901 9710 don't work Date: Mon, 17 May 2010 22:37:25 -0700 On Sun, May 16, 2010 at 6:56 PM, Garrett Cooper wrote: > On Sun, May 16, 2010 at 6:47 PM, Garrett Cooper wrot= e: >> On Sun, May 16, 2010 at 5:50 PM, Tommy Johnson wr= ote: >>> >>>>Number: =A0 =A0 =A0 =A0 146647 >>>>Category: =A0 =A0 =A0 kern >>>>Synopsis: =A0 =A0 =A0 Some PCIe seral/parallel boards with ID 9901 9710= don't work >>>>Confidential: =A0 no >>>>Severity: =A0 =A0 =A0 non-critical >>>>Priority: =A0 =A0 =A0 low >>>>Responsible: =A0 =A0freebsd-bugs >>>>State: =A0 =A0 =A0 =A0 =A0open >>>>Quarter: >>>>Keywords: >>>>Date-Required: >>>>Class: =A0 =A0 =A0 =A0 =A0sw-bug >>>>Submitter-Id: =A0 current-users >>>>Arrival-Date: =A0 Mon May 17 01:00:10 UTC 2010 >>>>Closed-Date: >>>>Last-Modified: >>>>Originator: =A0 =A0 Tommy Johnson >>>>Release: =A0 =A0 =A0 =A08.0 >>>>Organization: >>>>Environment: >>> FreeBSD teryx 8.0-STABLE FreeBSD 8.0-STABLE #8: Sat May 15 15:49:45 EDT= 2010 =A0 =A0 tjohnson@teryx:/usr/src/sys/amd64/compile/TERYX =A0amd64 >>>>Description: >>> Support for cards with vendor 9901 device 9710 is in the uart and ppc d= rivers. =A0Unfortunately several boards use the same PCI ID, and they don't= all work. >>> >>> The code as it exists right now, will support boards which use the buil= t in serial and parallel ports on the 9710 chip. =A0One or two serial, with= zero or one LPT will probably work. >>> >>> The board I have is four serial one LPT, which is implemented as two se= rial on the built in UARTS, and then an ISA bus interface with another two = UARTS and a LPT interface on that ISA bus. =A0Possibly implemented with a 1= 6S552 chip. =A0(It has no documentation, of course...) >>> >>> The same chip will also do a USB port (instead of an LPT, or ISA). >>> >>> So the first two serial ports are fine, but the second two serial ports= and the LPT fail to probe. >>>>How-To-Repeat: >>> Get a 9710 board with four serial and one LPT, and note that only the f= irst two serial ports work. >>>>Fix: >> >> Hi Tommy, >> =A0 =A0This is probably because the subvendor for your particular card >> hasn't been added yet. Could you run devinfo -v and provide us with >> the output, as well as a URL to the specific card that you acquired? >> Thanks! > > =A0 =A0pciconf -lv would be helpful as well so that the devinfo could be > properly mapped back to the appropriate device. Ok... the information you sent me just a while ago was interesting. It appears to be a card with similar attributes to the card I sent out in the past couple of months and Xinli (delphij@) was nice enough to add and MFC. Here's my card (for reference): uart2@pci0:1:0:0: class=3D0x070002 card=3D0x1000a000 chip=3D0x9901971= 0 rev=3D0x00 hdr=3D0x00 vendor =3D 'MosChip Semiconductors (Was: Netmos Technology)' class =3D simple comms subclass =3D UART uart3@pci0:1:0:1: class=3D0x070002 card=3D0x1000a000 chip=3D0x9901971= 0 rev=3D0x00 hdr=3D0x00 vendor =3D 'MosChip Semiconductors (Was: Netmos Technology)' class =3D simple comms subclass =3D UART ppc1@pci0:1:0:2: class=3D0x070103 card=3D0x2000a000 chip=3D0x9901971= 0 rev=3D0x00 hdr=3D0x00 vendor =3D 'MosChip Semiconductors (Was: Netmos Technology)' class =3D simple comms subclass =3D parallel port What's interesting about your card's details is that it isn't detecting the serial uarts based off the 4-port splitter as uarts, and is instead detecting them as parallel ports. Very interesting indeed... I'm not sure what modifications you've made to your local copy of ppc(4), but definitely back out everything (sans the IDs for ppc3), and add the PCI IDs to /sys/dev/uart/uart_bus_pci.c -- and it *should* detect the appropriate uarts. If not, there's some kind of configuration required that hasn't been setup on either the board or something in software that needs to be done that's specific to the card, or something that needs to be added to device.hints so that it properly configures the card irqs, etc. FWIW my card doesn't function with lpt(4) (it's passing interrupts to and from the driver, but I haven't hooked by the pinouts to see whether or not signals are being passed through). I'm working on root-causing what the issue is because it's related to work and impacts productivity with an internal tools release. Thanks for the documentation though -- I'll see what I can do about remedying the ppc(4) <-> lpt(4) issue over the next couple of weeks. Cheers, -Garrett