[Linux-parport] Documentation/parport.txt imprements

Martin Mokrejs mmokrejs at fold.natur.cuni.cz
Thu Feb 9 08:08:04 EST 2012


Hi,
  I am trying to get my HP OfficeJet R45 printer+scanner working under
Linux via Express Card 34mm from Axago based on MosChip 9901/9912.
Hmm, well lspci says NetMos while it looks it is MosChip instead (compare
with drivers at http://vbs.ddns.com.br:8000/drives/Drives/DRIVER LPT1/ ).

11:00.0 Serial controller: NetMos Technology Device 9912
11:00.1 Serial controller: NetMos Technology Device 9912
11:00.2 Parallel controller: NetMos Technology Device 9912

11:00.0 Serial controller: NetMos Technology Device 9912 (prog-if 02 [16550])
        Subsystem: Device a000:1000
        Physical Slot: 7
        Flags: fast devsel, IRQ 19
        I/O ports at c000 [size=8]
        Memory at f6c00000 (32-bit, non-prefetchable) [size=4K]
        Memory at f6c01000 (32-bit, non-prefetchable) [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] Virtual Channel
        Capabilities: [800] Advanced Error Reporting
        Kernel driver in use: serial

11:00.1 Serial controller: NetMos Technology Device 9912 (prog-if 02 [16550])
        Subsystem: Device a000:1000
        Physical Slot: 7
        Flags: fast devsel, IRQ 16
        I/O ports at c008 [size=8]
        Memory at f6c02000 (32-bit, non-prefetchable) [size=4K]
        Memory at f6c03000 (32-bit, non-prefetchable) [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
        Kernel driver in use: serial

11:00.2 Parallel controller: NetMos Technology Device 9912 (prog-if 03 [IEEE1284])
        Subsystem: Device a000:2000
        Physical Slot: 7
        Flags: fast devsel, IRQ 17
        I/O ports at c010 [size=8]
        I/O ports at c018 [size=8]
        Memory at f6c04000 (32-bit, non-prefetchable) [size=4K]
        Memory at f6c05000 (32-bit, non-prefetchable) [size=4K]
        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
        Kernel driver in use: parport_serial
        Kernel modules: parport_serial



The printer works but scanning worked just once in ECP mode. I couldn't
get the card to be showing EPP mode. In the ends, I found the patch at
http://lists.infradead.org/pipermail/linux-parport/2010-April/000688.html
and can confirm this enabled me to get EPP detected (the patch applies to
linux-3.2.2 with some large offset of the latter diff region, is just a
one-line change so can be done manually).

  So, after reading the MAINTAINERS file I see parport support is "orphaned",
great. :(

  I need some clarifications. ;)

1. Documentation/parport.txt seems to refer to kernel 2.2 or 2.4 syntax and
module names and I am just lost what option arguments are existing in 2.6
kernel (ooops, 3.2 already). For example, I think some arguments are valid
now for parport and parport_pc module but what is valid for parport_serial
I do not know. Would you please give me a couple of examples?

insmod complains on me that the argument is unsupported too often.


2. I happened to try xsane under the following situations but it could never
communicate to the scanner:

Feb  7 20:37:41 vostro kernel: parport_serial 0000:11:00.2: PCI INT C -> GSI 17 (level, low) -> IRQ 17
Feb  7 20:37:41 vostro kernel: parport1: PC-style at 0xc010 (0xc018), irq 17 [PCSPP,TRISTATE]
Feb  7 20:37:41 vostro kernel: parport1: Printer, HEWLETT-PACKARD OFFICEJET R45
Feb  7 20:37:41 vostro kernel: lp1: using parport1 (interrupt-driven).
Feb  7 20:42:06 vostro xsane: hpaio: hpaioScannerToSaneError: sclError=1. 
Feb  7 20:43:39 vostro xsane: failed to open scan channel: scan/sane/hpaio.c 659 
Feb  7 20:43:39 vostro xsane: sane_hpaio_cancel: already cancelled! 
Feb  7 20:45:22 vostro kernel: ppdev: user-space parallel port driver
Feb  7 20:45:45 vostro kernel: parport0: PC-style at 0xc010 (0xc018), irq 17 [PCSPP,TRISTATE]
Feb  7 20:45:45 vostro kernel: parport0: Printer, HEWLETT-PACKARD OFFICEJET R45
Feb  7 20:46:16 vostro hp-toolbox: hp-toolbox(UI)[5591]: warning: Supplies information not available for this device.
Feb  7 20:50:11 vostro kernel: ppdev: user-space parallel port driver
Feb  7 20:50:31 vostro kernel: parport0: PC-style at 0xc010 (0xc018), irq 17, using FIFO [PCSPP,TRISTATE,COMPAT,ECP]
Feb  7 20:50:31 vostro kernel: parport0: Printer, HEWLETT-PACKARD OFFICEJET R45
Feb  7 20:51:07 vostro xsane: hpaio: hpaioScannerToSaneError: sclError=1. 
Feb  7 20:52:43 vostro kernel: ppdev: user-space parallel port driver
Feb  7 20:52:59 vostro hp-toolbox: hp-toolbox(UI)[10483]: warning: Supplies information not available for this device.
Feb  7 20:53:01 vostro hp-toolbox: hp-toolbox(UI)[10483]: warning: Supplies information not available for this device.
Feb  7 20:53:41 vostro kernel: parport0: PC-style at 0xc010, irq 17 [PCSPP,TRISTATE,EPP]
Feb  7 20:53:42 vostro kernel: parport0: Printer, HEWLETT-PACKARD OFFICEJET R45
Feb  7 20:54:22 vostro xsane: hpaio: hpaioScannerToSaneError: sclError=1. 
Feb  7 21:05:24 vostro kernel: ppdev: user-space parallel port driver
Feb  7 21:05:41 vostro kernel: parport0: PC-style at 0xc010, irq 17 [PCSPP,TRISTATE,EPP]
Feb  7 21:05:41 vostro kernel: parport0: Printer, HEWLETT-PACKARD OFFICEJET R45
Feb  7 21:07:36 vostro xsane: failed to open scan channel: scan/sane/hpaio.c 659 
Feb  7 21:19:39 vostro kernel: parport_pc: dma specified without base address.  Use 'io=' to specify one
Feb  7 21:19:39 vostro kernel: ppdev: user-space parallel port driver
Feb  7 21:22:06 vostro kernel: parport0: PC-style at 0xc010, irq 17 [PCSPP,TRISTATE,EPP]
Feb  7 21:22:06 vostro kernel: parport0: Printer, HEWLETT-PACKARD OFFICEJET R45
Feb  7 21:23:55 vostro xsane: invalid SclInquire(cmd=2a86,param=18) exp(len=6)/act(len=0): scan/sane/scl.c 258 
Feb  7 21:23:55 vostro xsane: exp: 
Feb  7 21:23:55 vostro xsane: act: 


Yesterday once it used ECP but still, no scanning:

Feb  6 15:20:45 vostro kernel: pciehp 0000:00:1c.7:pcie04: Card present on Slot(7)
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.0: BAR 1: assigned [mem 0xf6c00000-0xf6c00fff]
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.0: BAR 1: set to [mem 0xf6c00000-0xf6c00fff] (PCI address [0xf6c00000-0xf6c00fff])
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.0: BAR 5: assigned [mem 0xf6c01000-0xf6c01fff]
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.0: BAR 5: set to [mem 0xf6c01000-0xf6c01fff] (PCI address [0xf6c01000-0xf6c01fff])
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.1: BAR 1: assigned [mem 0xf6c02000-0xf6c02fff]
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.1: BAR 1: set to [mem 0xf6c02000-0xf6c02fff] (PCI address [0xf6c02000-0xf6c02fff])
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.1: BAR 5: assigned [mem 0xf6c03000-0xf6c03fff]
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.1: BAR 5: set to [mem 0xf6c03000-0xf6c03fff] (PCI address [0xf6c03000-0xf6c03fff])
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.2: BAR 2: assigned [mem 0xf6c04000-0xf6c04fff]
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.2: BAR 2: set to [mem 0xf6c04000-0xf6c04fff] (PCI address [0xf6c04000-0xf6c04fff])
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.2: BAR 5: assigned [mem 0xf6c05000-0xf6c05fff]
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.2: BAR 5: set to [mem 0xf6c05000-0xf6c05fff] (PCI address [0xf6c05000-0xf6c05fff])
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.0: BAR 0: assigned [io  0xc000-0xc007]
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.0: BAR 0: set to [io  0xc000-0xc007] (PCI address [0xc000-0xc007])
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.1: BAR 0: assigned [io  0xc008-0xc00f]
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.1: BAR 0: set to [io  0xc008-0xc00f] (PCI address [0xc008-0xc00f])
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.2: BAR 0: assigned [io  0xc010-0xc017]
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.2: BAR 0: set to [io  0xc010-0xc017] (PCI address [0xc010-0xc017])
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.2: BAR 1: assigned [io  0xc018-0xc01f]
Feb  6 15:20:46 vostro kernel: pci 0000:11:00.2: BAR 1: set to [io  0xc018-0xc01f] (PCI address [0xc018-0xc01f])
Feb  6 15:20:46 vostro kernel: pcieport 0000:00:1c.7: PCI bridge to [bus 11-16]
Feb  6 15:20:46 vostro kernel: pcieport 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
Feb  6 15:20:46 vostro kernel: pcieport 0000:00:1c.7:   bridge window [mem 0xf6c00000-0xf7cfffff]
Feb  6 15:20:46 vostro kernel: pcieport 0000:00:1c.7:   bridge window [mem 0xf0000000-0xf10fffff 64bit pref]
Feb  6 15:20:46 vostro kernel: serial 0000:11:00.0: enabling device (0100 -> 0103)
Feb  6 15:20:46 vostro kernel: serial 0000:11:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
Feb  6 15:20:46 vostro kernel: 0000:11:00.0: ttyS0 at I/O 0xc000 (irq = 19) is a ST16650V2
Feb  6 15:20:47 vostro kernel: serial 0000:11:00.1: enabling device (0100 -> 0103)
Feb  6 15:20:47 vostro kernel: serial 0000:11:00.1: PCI INT B -> GSI 16 (level, low) -> IRQ 16
Feb  6 15:20:47 vostro kernel: 0000:11:00.1: ttyS1 at I/O 0xc008 (irq = 16) is a ST16650V2
Feb  6 15:20:47 vostro kernel: ppdev: user-space parallel port driver
Feb  6 15:20:47 vostro kernel: parport_serial 0000:11:00.2: enabling device (0100 -> 0103)
Feb  6 15:20:47 vostro kernel: parport_serial 0000:11:00.2: PCI INT C -> GSI 17 (level, low) -> IRQ 17
Feb  6 15:20:47 vostro kernel: parport0: PC-style at 0xc010 (0xc018), irq 17, using FIFO [PCSPP,TRISTATE,COMPAT,ECP]
Feb  6 15:20:47 vostro kernel: parport0: Printer, HEWLETT-PACKARD OFFICEJET R45
Feb  6 15:21:00 vostro hp-toolbox: hp-toolbox[3797]: warning: Fax disabled.
Feb  6 15:21:00 vostro hp-toolbox: hp-toolbox[3797]: warning: Fax disabled.
Feb  6 15:21:00 vostro hp-toolbox: hp-toolbox[3797]: warning: Please install version 2.0+ of Reportlab for coverpage support.
Feb  6 15:24:19 vostro hp-scan: hp-scan[3836]: warning: No destinations specified. Adding 'file' destination by default.
Feb  6 15:24:30 vostro hp-scan: failed to open scan channel: scan/sane/hpaio.c 659 
Feb  6 15:26:53 vostro hp-scan: hp-scan[3994]: warning: No destinations specified. Adding 'file' destination by default.
Feb  6 15:27:03 vostro hp-scan: failed to open scan channel: scan/sane/hpaio.c 659 
Feb  6 15:28:36 vostro xsane: failed to open scan channel: scan/sane/hpaio.c 659 
Feb  6 15:30:21 vostro xsane: failed to open scan channel: scan/sane/hpaio.c 659 
Feb  6 15:35:34 vostro kernel: lp0: using parport0 (interrupt-driven).
Feb  6 15:38:20 vostro hp-scan: hp-scan[25326]: warning: No destinations specified. Adding 'file' destination by default.
Feb  6 15:38:22 vostro hp-scan: hpaio: hpaioScannerToSaneError: sclError=1. 
Feb  6 15:51:01 vostro hp-scan: hp-scan[5610]: warning: No destinations specified. Adding 'file' destination by default.
Feb  6 15:52:00 vostro kernel: <30>udevd[13659]: starting version 171
Feb  6 15:52:32 vostro hp-scan: failed to open scan channel: scan/sane/hpaio.c 659 
Feb  6 15:55:52 vostro hp-check: hp-check[5400]: warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUP
S backend to function in HPLIP.
Feb  6 15:58:33 vostro kernel: lp0: ECP mode
Feb  6 16:02:02 vostro hp-scan: hp-scan[16385]: warning: No destinations specified. Adding 'file' destination by default.
Feb  6 16:03:34 vostro hp-scan: failed to open scan channel: scan/sane/hpaio.c 659 
Feb  6 16:04:18 vostro xsane: hpaio: hpaioScannerToSaneError: sclError=1. 
Feb  6 16:05:35 vostro hp-toolbox: hp-toolbox(UI)[8696]: warning: Supplies information not available for this device.
Feb  6 16:06:37 vostro xsane: invalid SclInquire(cmd=2a86,param=18) exp(len=6)/act(len=0): scan/sane/scl.c 258 
Feb  6 16:06:37 vostro xsane: exp: 
Feb  6 16:06:37 vostro xsane: act: 



Once I even saw (note the "Feb  5 13:47:59 vostro kernel: , using FIFO [PCSPP,TRISTATE,COMPAT,ECP]"):

Feb  5 13:47:58 vostro kernel: pciehp 0000:00:1c.7:pcie04: Card present on Slot(7)
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.0: BAR 1: assigned [mem 0xf6c00000-0xf6c00fff]
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.0: BAR 1: set to [mem 0xf6c00000-0xf6c00fff] (PCI address [0xf6c00000-0xf6c00fff])
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.0: BAR 5: assigned [mem 0xf6c01000-0xf6c01fff]
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.0: BAR 5: set to [mem 0xf6c01000-0xf6c01fff] (PCI address [0xf6c01000-0xf6c01fff])
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.1: BAR 1: assigned [mem 0xf6c02000-0xf6c02fff]
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.1: BAR 1: set to [mem 0xf6c02000-0xf6c02fff] (PCI address [0xf6c02000-0xf6c02fff])
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.1: BAR 5: assigned [mem 0xf6c03000-0xf6c03fff]
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.1: BAR 5: set to [mem 0xf6c03000-0xf6c03fff] (PCI address [0xf6c03000-0xf6c03fff])
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.2: BAR 2: assigned [mem 0xf6c04000-0xf6c04fff]
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.2: BAR 2: set to [mem 0xf6c04000-0xf6c04fff] (PCI address [0xf6c04000-0xf6c04fff])
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.2: BAR 5: assigned [mem 0xf6c05000-0xf6c05fff]
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.2: BAR 5: set to [mem 0xf6c05000-0xf6c05fff] (PCI address [0xf6c05000-0xf6c05fff])
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.0: BAR 0: assigned [io  0xc000-0xc007]
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.0: BAR 0: set to [io  0xc000-0xc007] (PCI address [0xc000-0xc007])
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.1: BAR 0: assigned [io  0xc008-0xc00f]
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.1: BAR 0: set to [io  0xc008-0xc00f] (PCI address [0xc008-0xc00f])
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.2: BAR 0: assigned [io  0xc010-0xc017]
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.2: BAR 0: set to [io  0xc010-0xc017] (PCI address [0xc010-0xc017])
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.2: BAR 1: assigned [io  0xc018-0xc01f]
Feb  5 13:47:59 vostro kernel: pci 0000:11:00.2: BAR 1: set to [io  0xc018-0xc01f] (PCI address [0xc018-0xc01f])
Feb  5 13:47:59 vostro kernel: pcieport 0000:00:1c.7: PCI bridge to [bus 11-16]
Feb  5 13:47:59 vostro kernel: pcieport 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
Feb  5 13:47:59 vostro kernel: pcieport 0000:00:1c.7:   bridge window [mem 0xf6c00000-0xf7cfffff]
Feb  5 13:47:59 vostro kernel: pcieport 0000:00:1c.7:   bridge window [mem 0xf0000000-0xf10fffff 64bit pref]
Feb  5 13:47:59 vostro kernel: serial 0000:11:00.0: enabling device (0100 -> 0103)
Feb  5 13:47:59 vostro kernel: serial 0000:11:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
Feb  5 13:47:59 vostro kernel: 0000:11:00.0: ttyS0 at I/O 0xc000 (irq = 19) is a ST16650V2
Feb  5 13:47:59 vostro kernel: serial 0000:11:00.1: enabling device (0100 -> 0103)
Feb  5 13:47:59 vostro kernel: serial 0000:11:00.1: PCI INT B -> GSI 16 (level, low) -> IRQ 16
Feb  5 13:47:59 vostro kernel: 0000:11:00.1: ttyS1 at I/O 0xc008 (irq = 16) is a ST16650V2
Feb  5 13:47:59 vostro kernel: parport_serial 0000:11:00.2: enabling device (0100 -> 0103)
Feb  5 13:47:59 vostro kernel: parport_serial 0000:11:00.2: PCI INT C -> GSI 17 (level, low) -> IRQ 17
Feb  5 13:47:59 vostro kernel: parport0: PC-style at 0xc010 (0xc018), irq 17
Feb  5 13:47:59 vostro kernel: ppdev: user-space parallel port driver
Feb  5 13:47:59 vostro kernel: , using FIFO [PCSPP,TRISTATE,COMPAT,ECP]
Feb  5 13:47:59 vostro kernel: parport0: Printer, HEWLETT-PACKARD OFFICEJET R45
Feb  5 13:48:26 vostro kernel: lp0: using parport0 (interrupt-driven).


3. It seems the file Documentation/parport.txt could document ECPSPP mode, if
I got it right from drivers/parport/parport_pc.c? Or is only for the VIA chipset
(look for ecpspp)?


4. Documentation/parport.txt says:

<quote>
o polling
o interrupt-driven, protocol in software
o interrupt-driven, protocol in hardware using PIO
o interrupt-driven, protocol in hardware using DMA

The kernel messages that parport_pc logs give an indication of which
code path is being used. (They could be a lot better actually..)

For normal printer protocol, having IEEE 1284 modes enabled or not
should not make a difference.

To turn off the 'protocol in hardware' code paths, disable
CONFIG_PARPORT_PC_FIFO.  Note that when they are enabled they are not
necessarily _used_; it depends on whether the hardware is available,
enabled by the BIOS, and detected by the driver.

So, to start with, disable CONFIG_PARPORT_PC_FIFO, and load parport_pc
with 'irq=none'. See if printing works then.  It really should,
because this is the simplest code path.
</quote>


Would somebody tell me how can I enable/disable these features on the
insmod() commandline? Also, correlate the 'protocols' to HPLIP
requirements mentioned below and correlate with syslog lines from my
system shown above (non-FIFO, FIFO, ECP negotiated)? I just do not know
which is ECP software mode, ECP hardware mode, which is the COMPAT and
which is EPP. Just translate the below text into module arguments. ;-)

<quote>
# Sometimes DMA doesn't work well (i.e. avoid the ECP+DMA mode), see
# https://bugzilla.novell.com/show_bug.cgi?id=116655
#
# http://comments.gmane.org/gmane.comp.printing.hplip.user/3004
# alias
# http://www.mail-archive.com/hplip-help@lists.sourceforge.net/msg02954.html
#
# For the OfficeJet Pro 1150C, HPLIP will print over the parallel port
# using "compatibility mode". This is the default IEEE 1284 mode. This is
# why printing normally works.
#
# Scanning requires MLC transport support. MLC is a multi-channel
# transport protocol and for parallel ports MLC will only  run over IEEE
# 1284 ECP mode. HPLIP only supports Software ECP mode, the lowest common
# denominator. HPLIP does not use hardware ECP. This means parport DMA and
# interrupts are not used by HPLIP.
#
# Based on your syslog output ppdev/parport is not allowing HPLIP to set
# Software ECP mode and that is why your scan job fails.
#
# Now if your ppdev/parport kernel modules are loaded correctly, I don't
# know why Software ECP mode is not available. This may be a kernel or
# BIOS issue.
#
#http://hplip.sourceforge.net/tech_docs/index.html
</quote>



Thank you very much for your time,
Martin



More information about the Linux-parport mailing list