0

I have a PCIe ParallelPort controller which sadly does not want to work. After plugging the parallel port card, it does not show up as I was expecting as /dev/parport0. Doing:

sudo rmmod parport_pc
sudo modprobe parport_pc io=0x4000

does show /dev/parport0 but the card does not work. When sending values on the data pin, I don't get any voltage. And dmesg | grep parport shows:

scheltie@linux-mathieu:~$ sudo dmesg | grep parport
[  266.761700] parport 0x4000 (WARNING): CTR: wrote 0x0c, read 0xff
[  266.761705] parport 0x4000 (WARNING): DATA: wrote 0xaa, read 0xff
[  266.761705] parport 0x4000: You gave this address, but there is probably no parallel port there!
[  266.761719] parport0: PC-style at 0x4000, irq 0 [PCSPP,TRISTATE]

Output from sudo lspci -v:

0000:01:00.2 Parallel controller: Asix Electronics Corporation AX99100 PCIe to Multi I/O Controller (prog-if 03 [IEEE1284])
    Subsystem: Asix Electronics Corporation (Wrong ID) Parallel Port
    Flags: fast devsel, IRQ 255
    I/O ports at 4008 [disabled] [size=8]
    I/O ports at 4000 [disabled] [size=8]
    Memory at 74001000 (32-bit, non-prefetchable) [disabled] [size=4K]
    Memory at 74000000 (32-bit, non-prefetchable) [disabled] [size=4K]
    Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
    Capabilities: [78] Power Management version 3
    Capabilities: [80] Express Legacy Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting

What strikes me is the [disabled] marked after the I/O ports and memory address. Any idea as to what might be the issue and how I could fix it?

Running on POP_OS 22.04 LTS, up-to-date. On a dual-boot computer with Windows, the card does work on Windows. Thus it is enabled in the BIOS.

1

1 Answer 1

1

I had the same problem with a StarTech PEX1P2 PCIe parallel port. lspci -nnv said that the I/O ports were disabled:

06:00.2 Parallel controller [0701]: Asix Electronics Corporation AX99100 PCIe to Multi I/O Controller [125b:9100] (prog-if 03 [IEEE1284])
        Subsystem: Asix Electronics Corporation (Wrong ID) Parallel Port [a000:2000]
        Flags: fast devsel, IRQ 5
        I/O ports at e010 [disabled] [size=8]
        I/O ports at e000 [disabled] [size=8]
        Memory at fcc01000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Memory at fcc00000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
        Capabilities: [78] Power Management version 3
        Capabilities: [80] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting

I solved it by creating /etc/modprobe.d/parport_pc.conf with the following:

install parport_pc setpci -d 125b:9100 command=101; /sbin/modprobe --ignore-install parport_pc
options parport_pc io=0xe010 irq=auto

Be sure to replace 125b:9100 with the device ID from the first line of lspci -nnv and replace 0xe010 with the I/O port from the fourth line. Now when the parport_pc module is loaded (e.g. with sudo modprobe parport_pc), it will set up the I/O ports at the same time.

There are two key parts here: The setpci command enables the I/O ports and the options line tells the driver what the base I/O address is. See the Linux Serial HOWTO for an explanation of setpci and this Arch Linux form post for an explanation of modprobe.d's install command.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .