xref: /linux/Documentation/admin-guide/blockdev/paride.rst (revision bfb921b2a9d5d1123d1d10b196a39db629ddef87)
1===================================
2Linux and parallel port IDE devices
3===================================
4
5PARIDE v1.03   (c) 1997-8  Grant Guenther <grant@torque.net>
6PATA_PARPORT   (c) 2023 Ondrej Zary
7
81. Introduction
9===============
10
11Owing to the simplicity and near universality of the parallel port interface
12to personal computers, many external devices such as portable hard-disk,
13CD-ROM, LS-120 and tape drives use the parallel port to connect to their
14host computer.  While some devices (notably scanners) use ad-hoc methods
15to pass commands and data through the parallel port interface, most
16external devices are actually identical to an internal model, but with
17a parallel-port adapter chip added in.  Some of the original parallel port
18adapters were little more than mechanisms for multiplexing a SCSI bus.
19(The Iomega PPA-3 adapter used in the ZIP drives is an example of this
20approach).  Most current designs, however, take a different approach.
21The adapter chip reproduces a small ISA or IDE bus in the external device
22and the communication protocol provides operations for reading and writing
23device registers, as well as data block transfer functions.  Sometimes,
24the device being addressed via the parallel cable is a standard SCSI
25controller like an NCR 5380.  The "ditto" family of external tape
26drives use the ISA replicator to interface a floppy disk controller,
27which is then connected to a floppy-tape mechanism.  The vast majority
28of external parallel port devices, however, are now based on standard
29IDE type devices, which require no intermediate controller.  If one
30were to open up a parallel port CD-ROM drive, for instance, one would
31find a standard ATAPI CD-ROM drive, a power supply, and a single adapter
32that interconnected a standard PC parallel port cable and a standard
33IDE cable.  It is usually possible to exchange the CD-ROM device with
34any other device using the IDE interface.
35
36The document describes the support in Linux for parallel port IDE
37devices.  It does not cover parallel port SCSI devices, "ditto" tape
38drives or scanners.  Many different devices are supported by the
39parallel port IDE subsystem, including:
40
41	- MicroSolutions backpack CD-ROM
42	- MicroSolutions backpack PD/CD
43	- MicroSolutions backpack hard-drives
44	- MicroSolutions backpack 8000t tape drive
45	- SyQuest EZ-135, EZ-230 & SparQ drives
46	- Avatar Shark
47	- Imation Superdisk LS-120
48	- Maxell Superdisk LS-120
49	- FreeCom Power CD
50	- Hewlett-Packard 5GB and 8GB tape drives
51	- Hewlett-Packard 7100 and 7200 CD-RW drives
52
53as well as most of the clone and no-name products on the market.
54
55To support such a wide range of devices, pata_parport is actually structured
56in two parts. There is a base pata_parport module which provides an interface
57to kernel libata subsystem, registry and some common methods for accessing
58the parallel ports.
59
60The second component is a set of low-level protocol drivers for each of the
61parallel port IDE adapter chips.  Thanks to the interest and encouragement of
62Linux users from many parts of the world, support is available for almost all
63known adapter protocols:
64
65	====    ====================================== ====
66        aten    ATEN EH-100                            (HK)
67        bpck    Microsolutions backpack                (US)
68        comm    DataStor (old-type) "commuter" adapter (TW)
69        dstr    DataStor EP-2000                       (TW)
70        epat    Shuttle EPAT                           (UK)
71        epia    Shuttle EPIA                           (UK)
72	fit2    FIT TD-2000			       (US)
73	fit3    FIT TD-3000			       (US)
74	friq    Freecom IQ cable                       (DE)
75        frpw    Freecom Power                          (DE)
76        kbic    KingByte KBIC-951A and KBIC-971A       (TW)
77	ktti    KT Technology PHd adapter              (SG)
78        on20    OnSpec 90c20                           (US)
79        on26    OnSpec 90c26                           (US)
80	====    ====================================== ====
81
82
832. Using pata_parport subsystem
84===============================
85
86While configuring the Linux kernel, you may choose either to build
87the pata_parport drivers into your kernel, or to build them as modules.
88
89In either case, you will need to select "Parallel port IDE device support"
90and at least one of the parallel port communication protocols.
91If you do not know what kind of parallel port adapter is used in your drive,
92you could begin by checking the file names and any text files on your DOS
93installation floppy.  Alternatively, you can look at the markings on
94the adapter chip itself.  That's usually sufficient to identify the
95correct device.
96
97You can actually select all the protocol modules, and allow the pata_parport
98subsystem to try them all for you.
99
100For the "brand-name" products listed above, here are the protocol
101and high-level drivers that you would use:
102
103	================	============	========
104	Manufacturer		Model		Protocol
105	================	============	========
106	MicroSolutions		CD-ROM		bpck
107	MicroSolutions		PD drive	bpck
108	MicroSolutions		hard-drive	bpck
109	MicroSolutions          8000t tape      bpck
110	SyQuest			EZ, SparQ	epat
111	Imation			Superdisk	epat
112	Maxell                  Superdisk       friq
113	Avatar			Shark		epat
114	FreeCom			CD-ROM		frpw
115	Hewlett-Packard		5GB Tape	epat
116	Hewlett-Packard		7200e (CD)	epat
117	Hewlett-Packard		7200e (CD-R)	epat
118	================	============	========
119
120All parports and all protocol drivers are probed automatically unless probe=0
121parameter is used. So just "modprobe epat" is enough for a Imation SuperDisk
122drive to work.
123
124Manual device creation::
125
126	# echo "port protocol mode unit delay" >/sys/bus/pata_parport/new_device
127
128where:
129
130	======== ================================================
131	port	 parport name (or "auto" for all parports)
132	protocol protocol name (or "auto" for all protocols)
133	mode	 mode number (protocol-specific) or -1 for probe
134	unit	 unit number (for backpack only, see below)
135	delay	 I/O delay (see troubleshooting section below)
136	======== ================================================
137
138If you happen to be using a MicroSolutions backpack device, you will
139also need to know the unit ID number for each drive.  This is usually
140the last two digits of the drive's serial number (but read MicroSolutions'
141documentation about this).
142
143If you omit the parameters from the end, defaults will be used, e.g.:
144
145Probe all parports with all protocols::
146
147	# echo auto >/sys/bus/pata_parport/new_device
148
149Probe parport0 using protocol epat and mode 4 (EPP-16)::
150
151	# echo "parport0 epat 4" >/sys/bus/pata_parport/new_device
152
153Probe parport0 using all protocols::
154
155	# echo "parport0 auto" >/sys/bus/pata_parport/new_device
156
157Probe all parports using protoocol epat::
158
159	# echo "auto epat" >/sys/bus/pata_parport/new_device
160
161Deleting devices::
162
163	# echo pata_parport.0 >/sys/bus/pata_parport/delete_device
164
165
1663. Troubleshooting
167==================
168
1693.1  Use EPP mode if you can
170----------------------------
171
172The most common problems that people report with the pata_parport drivers
173concern the parallel port CMOS settings.  At this time, none of the
174protocol modules support ECP mode, or any ECP combination modes.
175If you are able to do so, please set your parallel port into EPP mode
176using your CMOS setup procedure.
177
1783.2  Check the port delay
179-------------------------
180
181Some parallel ports cannot reliably transfer data at full speed.  To
182offset the errors, the protocol modules introduce a "port
183delay" between each access to the i/o ports.  Each protocol sets
184a default value for this delay.  In most cases, the user can override
185the default and set it to 0 - resulting in somewhat higher transfer
186rates.  In some rare cases (especially with older 486 systems) the
187default delays are not long enough.  if you experience corrupt data
188transfers, or unexpected failures, you may wish to increase the
189port delay.
190
1913.3  Some drives need a printer reset
192-------------------------------------
193
194There appear to be a number of "noname" external drives on the market
195that do not always power up correctly.  We have noticed this with some
196drives based on OnSpec and older Freecom adapters.  In these rare cases,
197the adapter can often be reinitialised by issuing a "printer reset" on
198the parallel port.  As the reset operation is potentially disruptive in
199multiple device environments, the pata_parport drivers will not do it
200automatically.  You can however, force a printer reset by doing::
201
202	insmod lp reset=1
203	rmmod lp
204
205If you have one of these marginal cases, you should probably build
206your pata_parport drivers as modules, and arrange to do the printer reset
207before loading the pata_parport drivers.
208