^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) Parport
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) +++++++
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) The ``parport`` code provides parallel-port support under Linux. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) includes the ability to share one port between multiple device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) drivers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) You can pass parameters to the ``parport`` code to override its automatic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) detection of your hardware. This is particularly useful if you want
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) to use IRQs, since in general these can't be autoprobed successfully.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) By default IRQs are not used even if they **can** be probed. This is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) because there are a lot of people using the same IRQ for their
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) parallel port and a sound card or network card.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) The ``parport`` code is split into two parts: generic (which deals with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) port-sharing) and architecture-dependent (which deals with actually
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) using the port).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) Parport as modules
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) ==================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) If you load the `parport`` code as a module, say::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) # insmod parport
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) to load the generic ``parport`` code. You then must load the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) architecture-dependent code with (for example)::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) # insmod parport_pc io=0x3bc,0x378,0x278 irq=none,7,auto
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) to tell the ``parport`` code that you want three PC-style ports, one at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 0x3bc with no IRQ, one at 0x378 using IRQ 7, and one at 0x278 with an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) auto-detected IRQ. Currently, PC-style (``parport_pc``), Sun ``bpp``,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) Amiga, Atari, and MFC3 hardware is supported.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) PCI parallel I/O card support comes from ``parport_pc``. Base I/O
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) addresses should not be specified for supported PCI cards since they
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) are automatically detected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) modprobe
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) If you use modprobe , you will find it useful to add lines as below to a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) configuration file in /etc/modprobe.d/ directory::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) alias parport_lowlevel parport_pc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) options parport_pc io=0x378,0x278 irq=7,auto
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) modprobe will load ``parport_pc`` (with the options ``io=0x378,0x278 irq=7,auto``)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) whenever a parallel port device driver (such as ``lp``) is loaded.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) Note that these are example lines only! You shouldn't in general need
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) to specify any options to ``parport_pc`` in order to be able to use a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) parallel port.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) Parport probe [optional]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) ------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) In 2.2 kernels there was a module called ``parport_probe``, which was used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) for collecting IEEE 1284 device ID information. This has now been
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) enhanced and now lives with the IEEE 1284 support. When a parallel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) port is detected, the devices that are connected to it are analysed,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) and information is logged like this::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) parport0: Printer, BJC-210 (Canon)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) The probe information is available from files in ``/proc/sys/dev/parport/``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) Parport linked into the kernel statically
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) =========================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) If you compile the ``parport`` code into the kernel, then you can use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) kernel boot parameters to get the same effect. Add something like the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) following to your LILO command line::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) parport=0x3bc parport=0x378,7 parport=0x278,auto,nofifo
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) You can have many ``parport=...`` statements, one for each port you want
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) to add. Adding ``parport=0`` to the kernel command-line will disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) parport support entirely. Adding ``parport=auto`` to the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) command-line will make ``parport`` use any IRQ lines or DMA channels that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) it auto-detects.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) Files in /proc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) ==============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) If you have configured the ``/proc`` filesystem into your kernel, you will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) see a new directory entry: ``/proc/sys/dev/parport``. In there will be a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) directory entry for each parallel port for which parport is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) configured. In each of those directories are a collection of files
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) describing that parallel port.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) The ``/proc/sys/dev/parport`` directory tree looks like::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) parport
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) |-- default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) | |-- spintime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) | `-- timeslice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) |-- parport0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) | |-- autoprobe
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) | |-- autoprobe0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) | |-- autoprobe1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) | |-- autoprobe2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) | |-- autoprobe3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) | |-- devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) | | |-- active
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) | | `-- lp
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) | | `-- timeslice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) | |-- base-addr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) | |-- irq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) | |-- dma
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) | |-- modes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) | `-- spintime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) `-- parport1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) |-- autoprobe
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) |-- autoprobe0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) |-- autoprobe1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) |-- autoprobe2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) |-- autoprobe3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) |-- devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) | |-- active
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) | `-- ppa
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) | `-- timeslice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) |-- base-addr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) |-- irq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) |-- dma
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) |-- modes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) `-- spintime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) .. tabularcolumns:: |p{4.0cm}|p{13.5cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) ======================= =======================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) File Contents
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) ======================= =======================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) ``devices/active`` A list of the device drivers using that port. A "+"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) will appear by the name of the device currently using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) the port (it might not appear against any). The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) string "none" means that there are no device drivers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) using that port.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) ``base-addr`` Parallel port's base address, or addresses if the port
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) has more than one in which case they are separated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) with tabs. These values might not have any sensible
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) meaning for some ports.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) ``irq`` Parallel port's IRQ, or -1 if none is being used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) ``dma`` Parallel port's DMA channel, or -1 if none is being
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) ``modes`` Parallel port's hardware modes, comma-separated,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) meaning:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) - PCSPP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) PC-style SPP registers are available.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) - TRISTATE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) Port is bidirectional.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) - COMPAT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) Hardware acceleration for printers is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) available and will be used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) - EPP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) Hardware acceleration for EPP protocol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) is available and will be used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) - ECP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) Hardware acceleration for ECP protocol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) is available and will be used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) - DMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) DMA is available and will be used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) Note that the current implementation will only take
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) advantage of COMPAT and ECP modes if it has an IRQ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) line to use.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) ``autoprobe`` Any IEEE-1284 device ID information that has been
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) acquired from the (non-IEEE 1284.3) device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) ``autoprobe[0-3]`` IEEE 1284 device ID information retrieved from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) daisy-chain devices that conform to IEEE 1284.3.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) ``spintime`` The number of microseconds to busy-loop while waiting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) for the peripheral to respond. You might find that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) adjusting this improves performance, depending on your
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) peripherals. This is a port-wide setting, i.e. it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) applies to all devices on a particular port.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) ``timeslice`` The number of milliseconds that a device driver is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) allowed to keep a port claimed for. This is advisory,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) and driver can ignore it if it must.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) ``default/*`` The defaults for spintime and timeslice. When a new
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) port is registered, it picks up the default spintime.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) When a new device is registered, it picks up the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) default timeslice.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) ======================= =======================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) Device drivers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) ==============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) Once the parport code is initialised, you can attach device drivers to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) specific ports. Normally this happens automatically; if the lp driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) is loaded it will create one lp device for each port found. You can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) override this, though, by using parameters either when you load the lp
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) driver::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) # insmod lp parport=0,2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) or on the LILO command line::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) lp=parport0 lp=parport2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) Both the above examples would inform lp that you want ``/dev/lp0`` to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) the first parallel port, and /dev/lp1 to be the **third** parallel port,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) with no lp device associated with the second port (parport1). Note
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) that this is different to the way older kernels worked; there used to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) be a static association between the I/O port address and the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) name, so ``/dev/lp0`` was always the port at 0x3bc. This is no longer the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) case - if you only have one port, it will default to being ``/dev/lp0``,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) regardless of base address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) Also:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) * If you selected the IEEE 1284 support at compile time, you can say
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) ``lp=auto`` on the kernel command line, and lp will create devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) only for those ports that seem to have printers attached.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) * If you give PLIP the ``timid`` parameter, either with ``plip=timid`` on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) the command line, or with ``insmod plip timid=1`` when using modules,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) it will avoid any ports that seem to be in use by other devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) * IRQ autoprobing works only for a few port types at the moment.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) Reporting printer problems with parport
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) =======================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) If you are having problems printing, please go through these steps to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) try to narrow down where the problem area is.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) When reporting problems with parport, really you need to give all of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) the messages that ``parport_pc`` spits out when it initialises. There are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) several code paths:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) - polling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) - interrupt-driven, protocol in software
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) - interrupt-driven, protocol in hardware using PIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) - interrupt-driven, protocol in hardware using DMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) The kernel messages that ``parport_pc`` logs give an indication of which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) code path is being used. (They could be a lot better actually..)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) For normal printer protocol, having IEEE 1284 modes enabled or not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) should not make a difference.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) To turn off the 'protocol in hardware' code paths, disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) ``CONFIG_PARPORT_PC_FIFO``. Note that when they are enabled they are not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) necessarily **used**; it depends on whether the hardware is available,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) enabled by the BIOS, and detected by the driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) So, to start with, disable ``CONFIG_PARPORT_PC_FIFO``, and load ``parport_pc``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) with ``irq=none``. See if printing works then. It really should,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) because this is the simplest code path.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) If that works fine, try with ``io=0x378 irq=7`` (adjust for your
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) hardware), to make it use interrupt-driven in-software protocol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) If **that** works fine, then one of the hardware modes isn't working
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) right. Enable ``CONFIG_FIFO`` (no, it isn't a module option,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) and yes, it should be), set the port to ECP mode in the BIOS and note
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) the DMA channel, and try with::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) io=0x378 irq=7 dma=none (for PIO)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) io=0x378 irq=7 dma=3 (for DMA)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) ----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) philb@gnu.org
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) tim@cyberelk.net