From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 28 22:20:09 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5C08106564A for ; Sun, 28 Nov 2010 22:20:09 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5030D8FC1D for ; Sun, 28 Nov 2010 22:20:07 +0000 (UTC) Received: by wyf19 with SMTP id 19so3726510wyf.13 for ; Sun, 28 Nov 2010 14:20:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.73.74 with SMTP id u52mr2074665wed.73.1290982806963; Sun, 28 Nov 2010 14:20:06 -0800 (PST) Received: by 10.216.242.139 with HTTP; Sun, 28 Nov 2010 14:20:06 -0800 (PST) X-Originating-IP: [203.99.129.1] In-Reply-To: References: Date: Mon, 29 Nov 2010 11:20:06 +1300 Message-ID: From: Jonathan Chen To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Fwd: puc(4) and single I/O port cards. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2010 22:20:09 -0000 Hi, I've recently added a PCI 1 Parallel Port card, and I'm trying to get it recognised by my 8-STABLE/amd64 system. The relevant entry from "pciconv -lcv" is: =A0 =A0none2@pci0:4:6:0: =A0 class=3D0x070103 card=3D0x2000a000 chip=3D0x98= 659710 rev=3D0x00 hdr=3D0x00 =A0 =A0 =A0 =A0vendor =A0 =A0 =3D 'MosChip Semiconductors (Was: Netmos Tech= nology)' =A0 =A0 =A0 =A0class =A0 =A0 =A0=3D simple comms =A0 =A0 =A0 =A0subclass =A0 =3D parallel port =A0 =A0 =A0 =A0cap 01[48] =3D powerspec 2 =A0supports D0 D3 =A0current D0 This is matched by info from "devinfo -rv": =A0 =A0unknown pnpinfo vendor=3D0x9710 device=3D0x9865 subvendor=3D0xa000 subdevice=3D0x2000 class=3D0x070103 at slot=3D6 function=3D0 Using this info, I've patched sys/dev/puc/pucdata.c: *** pucdata.c.orig =A0 =A0 =A0Fri Nov 26 20:31:08 2010 --- pucdata.c =A0 Fri Nov 26 20:32:10 2010 *************** *** 820,825 **** --- 820,831 ---- =A0 =A0 =A0 =A0 =A0 =A0PUC_PORT_4S1P, 0x10, 4, 0, =A0 =A0 =A0 =A0}, + =A0 =A0 =A0 { =A0 0x9710, 0x9865, 0xa000, 0x2000, + =A0 =A0 =A0 =A0 =A0 "NetMos NM9865 Single 1284 Printer port", + =A0 =A0 =A0 =A0 =A0 DEFAULT_RCLK, + =A0 =A0 =A0 =A0 =A0 PUC_PORT_1P, 0x10, 4, 0, + =A0 =A0 =A0 }, + =A0 =A0 =A0 =A0{ =A0 0x9710, 0x9865, 0xa000, 0x3002, =A0 =A0 =A0 =A0 =A0 =A0"NetMos NM9865 Dual UART", =A0 =A0 =A0 =A0 =A0 =A0DEFAULT_RCLK, And I've added the following line to /boot/loader.conf: =A0 =A0puc_load=3D"YES" However, all of this doesn't work. dmesg reveals: =A0 =A0pci4: on pcib4 =A0 =A0pci4: at device 6.0 (no driver attache= d) I've taken a look at the puc(4) code, and from my limited understanding, it appears that the section that's preventing it from being recognised is in puc.c:puc_bfe_probe(). In particular: =A0 =A0/* We don't attach to single-port serial cards. */ =A0 =A0if (cfg->ports =3D=3D PUC_PORT_1S || cfg->ports =3D=3D PUC_PORT_1P) =A0 =A0 =A0 =A0return (EDOOFUS); Why is the check there? Is there something about single I/O port cards that interacts badly with the rest of the system? Cheers. -- Jonathan Chen ----------------------------------------------------------------------- "I love deadlines. I like the whooshing sound they make as they fly by" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0- Douglas Adams