11.4: How to get parallel interface card with MCS9865 driver work?

I have difficulties in getting a parallel printer interface work with OpenSuse using PCI-e card with Moschip MCS9901 chip.

The accompanied driver cd just contains this file:
https://build.opensuse.org/package/files?package=MCS9865&project=home%3Amalcolmlewis%3AKMP

Regarding the parallel port the readme just states this:

>
> Steps for setting parallel port :
> ---------------------------------
> 1. rmmod lp
> 2. rmmod parport_pc
> 2. insmod /usr/lib/modules/2.6.15/kernel/drivers/parport/parport_pc io=0xb000 irq=10.
>
> Note: Here, the io and irq should be noted from lspci -v.
>

lspci -vk gives this output:

01:00.2 Parallel controller: NetMos Technology Device 9912 (prog-if 03 [IEEE1284])
Subsystem: Device a000:2000
Flags: bus master, fast devsel, latency 0, IRQ 10
I/O ports at d000 [size=8]
I/O ports at c800 [size=8]
Memory at fe8fb000 (32-bit, non-prefetchable) [size=4]
Memory at fe8fa000 (32-bit, non-prefetchable) [size=4]
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Power Management version 3
Capabilities: [80] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting

There is no kernel driver listed in the lspci output.

So looked for the modules path and found there is no /usr/lib/modules/… directory.
The only file with "parport_pc| I found is there: /lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/parport/parport_pc.ko

So I continued:

insmod /lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/parport/parport_pc io=d000 irq=10

insmod: can’t read ‘/lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/parport/parport_pc’: No such file or directory

insmod /lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/parport/parport_pc.ko io=d000 irq=10

insmod: error inserting ‘/lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/parport/parport_pc.ko’: -1 File exists

What did I do wrong?
Thanks for help![/size][/size][/size][/size]

lspci -vk gives this output:

01:00.2 Parallel controller: NetMos Technology Device 9912 (prog-if 03 [IEEE1284])
Subsystem: Device a000:2000
Flags: bus master, fast devsel, latency 0, IRQ 10
I/O ports at d000 [size=8]
I/O ports at c800 [size=8]
Memory at fe8fb000 (32-bit, non-prefetchable) [size=4]
Memory at fe8fa000 (32-bit, non-prefetchable) [size=4]
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Power Management version 3
Capabilities: [80] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting

I’m not sure that anything is wrong. This kind of output usually means that the device is functioning. (Usually the parport_pc driver will autodetect and configure all available parallel ports as required, so no parameters need to be issued).

Try using ‘modprobe’ instead like this:

  1. Unload the existing driver (if loaded)
sudo modprobe -r parport_pc

port

  1. Then load the driver with the relevant I/O port address
sudo modprobe parport_pc io=0xd000

For printing you may also need

sudo modprobe lp

That should be all that is required. You can check if /dev/lp0 exists with

ls -l /dev/lp*

If necessary, manual configuration can be specified at boot time like this (with your preferred editor eg nano)

sudo nano /etc/modprobe.d/parport_pc
options parport_pc io=dxe000

[/size][/size][/size][/size]

And please blitzdumm, use CODE taggs around your computer text. the same way deano_ferrari does do this: Posting in Code Tags - A Guide

Hi
So the CD that came with the device contains my rpm or a link to my rpm?

It needs updating to build with 11.4.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 19:24, 6 users, load average: 0.03, 0.17, 0.18
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

Hi
I’ve updated the driver and added a patch so it builds with the newer
kernels;

Building status can be seen here;
https://build.opensuse.org/package/show?package=MCS9865&project=home%3Amalcolmlewis%3AKMP

It should arrive here sooner, rather than later for openSUSE 11.4.
http://software.opensuse.org/search?q=MCS9865&baseproject=openSUSE%3A11.4&lang=en&include_home=true&exclude_debug=true

Just make sure you select the one that matches your kernel from the
output of the command;


uname -a


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 1 day 0:17, 7 users, load average: 0.92, 0.50, 0.39
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

Thanks to all for your help!

After I did the steps deano_ferrari suggested the interface works like a charm :slight_smile:
Didn’t need to do the latest step. Thanks for including that too, it solved my question how to do hardware configuration manually on linux.

The file on the driver cd (manufacturer Delock) was just a .tar.gz, containing about the same stuff I found at the link in the first post. It was no rpm, and there also was no link.
And thanks to Malcolm, your work will be appreciated, as these Moschip cards seem becoming more and more common nowadays, as fewer and fewer pcs are manufactured with traditional serial and parallel ports.

Again, big thanks to all!

Well done. Thanks for reporting back :slight_smile: