Fwd: puc(4) and single I/O port cards.
Jonathan Chen
jonc at chen.org.nz
Sun Nov 28 22:20:09 UTC 2010
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:
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)
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:
/* We don't attach to single-port serial cards. */
if (cfg->ports == PUC_PORT_1S || cfg->ports == PUC_PORT_1P)
return (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 <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-hackers
mailing list