Gentoo Archives: gentoo-user

From: karl@××××××××.se
To: gentoo-user@l.g.o
Subject: [gentoo-user] Problems with /dev/parport0
Date: Thu, 02 May 2019 15:33:33
Message-Id: 20190502153322.80CE481F9EFC@turkos.aspodata.se
1 Where is the proper place to ask about parports ?
2
3 ///
4
5 I get:
6 # echo -n 1 > /dev/parport0
7 bash: echo: write error: Invalid argument
8
9 i.e. error 22 (EINVAL), as if there isn't any write routine
10 in the driver. I have tested two identical cards, same story.
11
12 Same thing with reading:
13 $ dd if=/dev/parport0 count=1 bs=1
14 dd: error reading '/dev/parport0': Invalid argument
15 0+0 records in
16 0+0 records out
17 0 bytes copied, 6.2359e-05 s, 0.0 kB/s
18
19 open() and close() works without errors.
20
21 How can I make it functional ?
22
23 ///
24
25 I have two Delock 1x par, 2x ser pcie cards (only one installed).
26 The parport one show up (lspci -vn) as:
27 05:00.2 0701: 9710:9912 (prog-if 03 [IEEE1284])
28 Subsystem: a000:2000
29 Flags: bus master, fast devsel, latency 0, IRQ 17
30 I/O ports at ad00 [size=8]
31 I/O ports at ac00 [size=8]
32 Memory at fd8fb000 (32-bit, non-prefetchable) [size=4K]
33 Memory at fd8fa000 (32-bit, non-prefetchable) [size=4K]
34 Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
35 Capabilities: [78] Power Management version 3
36 Capabilities: [80] Express Legacy Endpoint, MSI 00
37 Capabilities: [100] Advanced Error Reporting
38 Kernel driver in use: parport_serial
39 Kernel modules: parport_serial
40
41 it matches:
42 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9912,
43 0xA000, 0x2000, 0, 0, netmos_99xx_1p }
44 i.e. lines 176-177 in drivers/parport/parport_serial.c
45 in the kernel source, last changed ages ago:
46 commit b9b24558f7d36c550b5cf0b550a8926f8c03cdbd
47 Author: Frédéric Brière <fbriere@×××××××.net>
48 Date: Sun May 29 15:08:04 2011 -0400
49
50 It shows up in the log as:
51 parport0: PC-style at 0xad00 (0xac00), irq 17, using FIFO [PCSPP,TRISTATE,COMPAT,EPP,ECP]
52 or
53 parport0: PC-style at 0xad00 (0xac00), irq 17 [PCSPP,TRISTATE,EPP]
54 depending if I have CONFIG_PARPORT_PC_FIFO set or not in the kernel
55
56 I cannot set irq to none, it shows up as irq 17 even though I do:
57 # modprobe parport_pc irq=none
58 # modprobe parport_serial irq=none
59
60 The device file has sensible maj/min numbers:
61 # ls -l /dev/parport0
62 crw-rw---- 1 root users 99, 0 Jan 18 2016 /dev/parport0
63
64 Regards,
65 /Karl Hammar

Replies

Subject Author
Re: [gentoo-user] Problems with /dev/parport0 Hogren <hogren@×××××.com>