Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Nov 2010 07:10:48 +1300
From:      Jonathan Chen <jonc@chen.org.nz>
To:        freebsd-stable@freebsd.org
Subject:   puc(4) and pucdata.c
Message-ID:  <20101126181048.GA4955@osiris.chen.org.nz>

next in thread | raw e-mail | index | archive | help
Hi,

I've recently added a new 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:
    none2@pci0:4:6:0:	class=0x070103 card=0x2000a000 chip=0x98659710 rev=0x00 hdr=0x00
        vendor     = 'MosChip Semiconductors (Was: Netmos Technology)'
        class      = simple comms
        subclass   = parallel port
        cap 01[48] = powerspec 2  supports D0 D3  current D0

This is matched by info from "devinfo -rv":
    unknown pnpinfo vendor=0x9710 device=0x9865 subvendor=0xa000 subdevice=0x2000 class=0x070103 at slot=6 function=0

Using this info, I've patched sys/dev/puc/pucdata.c:

*** pucdata.c.orig	Fri Nov 26 20:31:08 2010
--- pucdata.c	Fri Nov 26 20:32:10 2010
***************
*** 820,825 ****
--- 820,831 ----
  	    PUC_PORT_4S1P, 0x10, 4, 0,
  	},
  
+ 	{   0x9710, 0x9865, 0xa000, 0x2000,
+ 	    "NetMos NM9865 Single 1284 Printer port",
+ 	    DEFAULT_RCLK,
+ 	    PUC_PORT_1P, 0x10, 4, 0,
+ 	},
+ 
  	{   0x9710, 0x9865, 0xa000, 0x3002,
  	    "NetMos NM9865 Dual UART",
  	    DEFAULT_RCLK,

And I've added the following line to /boot/loader.conf:
    puc_load="YES"

However, all of this doesn't work. dmesg reveals:
    pci4: <ACPI PCI bus> on pcib4
    pci4: <simple comms, parallel port> at device 6.0 (no driver attached)

What did I miss? Is my patch correct?

Cheers.
-- 
Jonathan Chen <jonc@chen.org.nz>
-----------------------------------------------------------------------
"I love deadlines. I like the whooshing sound they make as they fly by"
                                                        - Douglas Adams



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101126181048.GA4955>