puc(4) and pucdata.c

Jonathan Chen jonc at chen.org.nz
Fri Nov 26 18:38:25 UTC 2010


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 at 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 at chen.org.nz>
-----------------------------------------------------------------------
"I love deadlines. I like the whooshing sound they make as they fly by"
                                                        - Douglas Adams


More information about the freebsd-stable mailing list