Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 2010 11:20:06 +1300
From:      Jonathan Chen <jonc@chen.org.nz>
To:        freebsd-hackers@freebsd.org
Subject:   Fwd: puc(4) and single I/O port cards.
Message-ID:  <AANLkTinrMaqB9Bev41NwgQSSvcF19TyOQ4T4PW-S_2vd@mail.gmail.com>
In-Reply-To: <AANLkTikz0KLu4v9J2kJmmQ=rZe54CSjvZ%2BG0pu0SC4Nw@mail.gmail.com>
References:  <AANLkTikz0KLu4v9J2kJmmQ=rZe54CSjvZ%2BG0pu0SC4Nw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <ACPI PCI bus> on pcib4
=A0 =A0pci4: <simple comms, parallel port> 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 <jonc@chen.org.nz>
-----------------------------------------------------------------------
"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



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