David Taylor
2005-Apr-07 08:48 UTC
puc, ppc and MosChip SemiConductors Nm9805 Parallel Port Adapter
Hi, I've got an amd64 box with 1 built-in parallel port, which works fine. I also bought an add-on parallel port adapter card (a MosChip SemiConductors Nm9805 chip). After discovering puc, I enabled device puc and the card is now detected by puc, but doesn't appear to be picked up by the ppc driver. I'm running -STABLE from about 24 hours ago. In dmesg: puc0: <NetMos NM9805 1284 Printer port> port 0xd000-0xd00f,0xd400-0xd407,0xd800-0xd807, 0xdc00-0xdc07,0xe000-0xe007,0xe400-0xe407 irq 19 at device 8.0 on pci0 puc: name: NetMos NM9805 1284 Printer port puc0: Reserved 0x8 bytes for rid 0x10 type 4 at 0xe400 port rid 16 bst 0, start e400, end e407 puc: Using ppc0 puc: type 2, bar 10, offset 0 In pciconf -lv: puc0@pci0:8:0: class=0x078000 card=0x00101000 chip=0x98059710 rev=0x01 hdr=0x00 vendor = 'MosChip Semiconductors (Was: Netmos Technology)' device = 'Nm9805 Parallel Port Adapter' class = simple comms However, despite the 'using ppc0' line, ppc0 is never mentioned again. The on-board parallel port is allocated to ppc1: ppc1: <ECP parallel printer port> port 0x778-0x77b,0x378-0x37f irq 7 drq 3 on acpi0 ppc1: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc1: FIFO with 16/16/9 bytes threshold ppbus0: <Parallel port bus> on ppc1 ppbus0: IEEE1284 device found /NIBBLE/ECP Probing for PnP devices on ppbus0: ppbus0: <HEWLETT-PACKARD DESKJET 610C> MLC,PCL,PML lpt0: <Printer> on ppbus0 lpt0: Interrupt-driven port However, ppc doesnt appear to exist: # sysctl dev.ppc.0 sysctl: unknown oid 'dev.ppc.0' Since the card is detected, and the puc driver claims to be 'using ppc0', I'm not really sure what to try now. Any one have any ideas? P.S. Please CC me on any replies, as I am not subscribed to this list. -- David Taylor
On Thu, 07 Apr 2005, David Taylor wrote:> Hi, > > I've got an amd64 box with 1 built-in parallel port, which works fine. > > I also bought an add-on parallel port adapter card (a MosChip > SemiConductors Nm9805 chip). After discovering puc, I enabled > device puc and the card is now detected by puc, but doesn't > appear to be picked up by the ppc driver.I have now, finally, figured out what was going on. After much wasted time trying to debug ppc_puc.c, I realised it wasn't even being compiled in the kernel. After adding dev/ppc/ppc_puc.c to files.amd64, everything worked a lot better. A patch (against 5-STABLE) is attached, which adds ppc_puc.c to all architectures with ppc.c listed (alpha, amd64, ia64 -- I can only test amd64, however). If this gets lost for ages, I'll add a PR... -- David Taylor -------------- next part -------------- --- sys/conf/files.alpha.old Wed Apr 13 12:20:57 2005 +++ sys/conf/files.alpha Wed Apr 13 12:21:43 2005 @@ -183,6 +183,7 @@ dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/ppc/ppc.c optional ppc +dev/ppc/ppc_puc.c optional ppc puc pci dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa dev/syscons/schistory.c optional sc --- sys/conf/files.amd64.old Wed Apr 13 12:21:15 2005 +++ sys/conf/files.amd64 Wed Apr 13 12:21:53 2005 @@ -133,6 +133,7 @@ dev/kbd/kbd.c optional ukbd dev/mem/memutil.c optional mem dev/ppc/ppc.c optional ppc +dev/ppc/ppc_puc.c optional ppc puc pci dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa dev/syscons/apm/apm_saver.c optional apm_saver apm --- sys/conf/files.ia64.old Wed Apr 13 12:21:05 2005 +++ sys/conf/files.ia64 Wed Apr 13 12:22:11 2005 @@ -59,6 +59,7 @@ dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/ppc/ppc.c optional ppc isa +dev/ppc/ppc_puc.c optional ppc puc pci dev/syscons/schistory.c optional sc dev/syscons/scmouse.c optional sc dev/syscons/scterm-dumb.c optional sc