← Documents Documentation/admin-guide/blockdev/paride.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Block devices

Linux and parallel port IDE devices

PATA_PARPORT architecture와 14개 adapter protocol, automatic/manual probe, EPP·delay·printer-reset troubleshooting을 설명합니다.

Source pathDocumentation/admin-guide/blockdev/paride.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

Architecture and protocols

paride.rst:1-82

Parallel adapter가 standard IDE/ATAPI bus를 재현하며 base module과 low-level protocol driver로 나뉩니다.

Probe and device management

paride.rst:83-165

Kernel selection, product mapping과 new_device/delete_device sysfs 형식을 설명합니다.

EPP mode

paride.rst:166-177

ECP 대신 CMOS에서 EPP mode를 사용합니다.

Port delay

paride.rst:178-190

Transfer speed와 old-port reliability 사이에서 access delay를 조정합니다.

Printer reset

paride.rst:191-207

불안정한 adapter는 lp reset 뒤 protocol module을 load합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 ===================================
2 Linux and parallel port IDE devices
3 ===================================
4
5 PARIDE v1.03 (c) 1997-8 Grant Guenther <[email protected]>
6 PATA_PARPORT (c) 2023 Ondrej Zary
7
8 1. Introduction
9 ===============
10
11 Owing to the simplicity and near universality of the parallel port interface
12 to personal computers, many external devices such as portable hard-disk,
13 CD-ROM, LS-120 and tape drives use the parallel port to connect to their
14 host computer. While some devices (notably scanners) use ad-hoc methods
15 to pass commands and data through the parallel port interface, most
16 external devices are actually identical to an internal model, but with
17 a parallel-port adapter chip added in. Some of the original parallel port
18 adapters 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
20 approach). Most current designs, however, take a different approach.
21 The adapter chip reproduces a small ISA or IDE bus in the external device
22 and the communication protocol provides operations for reading and writing
23 device registers, as well as data block transfer functions. Sometimes,
24 the device being addressed via the parallel cable is a standard SCSI
25 controller like an NCR 5380. The "ditto" family of external tape
26 drives use the ISA replicator to interface a floppy disk controller,
27 which is then connected to a floppy-tape mechanism. The vast majority
28 of external parallel port devices, however, are now based on standard
29 IDE type devices, which require no intermediate controller. If one
30 were to open up a parallel port CD-ROM drive, for instance, one would
31 find a standard ATAPI CD-ROM drive, a power supply, and a single adapter
32 that interconnected a standard PC parallel port cable and a standard
33 IDE cable. It is usually possible to exchange the CD-ROM device with
34 any other device using the IDE interface.
35
36 The document describes the support in Linux for parallel port IDE
37 devices. It does not cover parallel port SCSI devices, "ditto" tape
38 drives or scanners. Many different devices are supported by the
39 parallel 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
53 as well as most of the clone and no-name products on the market.
54
55 To support such a wide range of devices, pata_parport is actually structured
56 in two parts. There is a base pata_parport module which provides an interface
57 to kernel libata subsystem, registry and some common methods for accessing
58 the parallel ports.
59
60 The second component is a set of low-level protocol drivers for each of the
61 parallel port IDE adapter chips. Thanks to the interest and encouragement of
62 Linux users from many parts of the world, support is available for almost all
63 known 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
83 2. Using pata_parport subsystem
84 ===============================
85
86 While configuring the Linux kernel, you may choose either to build
87 the pata_parport drivers into your kernel, or to build them as modules.
88
89 In either case, you will need to select "Parallel port IDE device support"
90 and at least one of the parallel port communication protocols.
91 If you do not know what kind of parallel port adapter is used in your drive,
92 you could begin by checking the file names and any text files on your DOS
93 installation floppy. Alternatively, you can look at the markings on
94 the adapter chip itself. That's usually sufficient to identify the
95 correct device.
96
97 You can actually select all the protocol modules, and allow the pata_parport
98 subsystem to try them all for you.
99
100 For the "brand-name" products listed above, here are the protocol
101 and 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
120 All parports and all protocol drivers are probed automatically unless probe=0
121 parameter is used. So just "modprobe epat" is enough for an Imation SuperDisk
122 drive to work.
123
124 Manual device creation::
125
126 # echo "port protocol mode unit delay" >/sys/bus/pata_parport/new_device
127
128 where:
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
138 If you happen to be using a MicroSolutions backpack device, you will
139 also need to know the unit ID number for each drive. This is usually
140 the last two digits of the drive's serial number (but read MicroSolutions'
141 documentation about this).
142
143 If you omit the parameters from the end, defaults will be used, e.g.:
144
145 Probe all parports with all protocols::
146
147 # echo auto >/sys/bus/pata_parport/new_device
148
149 Probe parport0 using protocol epat and mode 4 (EPP-16)::
150
151 # echo "parport0 epat 4" >/sys/bus/pata_parport/new_device
152
153 Probe parport0 using all protocols::
154
155 # echo "parport0 auto" >/sys/bus/pata_parport/new_device
156
157 Probe all parports using protoocol epat::
158
159 # echo "auto epat" >/sys/bus/pata_parport/new_device
160
161 Deleting devices::
162
163 # echo pata_parport.0 >/sys/bus/pata_parport/delete_device
164
165
166 3. Troubleshooting
167 ==================
168
169 3.1 Use EPP mode if you can
170 ----------------------------
171
172 The most common problems that people report with the pata_parport drivers
173 concern the parallel port CMOS settings. At this time, none of the
174 protocol modules support ECP mode, or any ECP combination modes.
175 If you are able to do so, please set your parallel port into EPP mode
176 using your CMOS setup procedure.
177
178 3.2 Check the port delay
179 -------------------------
180
181 Some parallel ports cannot reliably transfer data at full speed. To
182 offset the errors, the protocol modules introduce a "port
183 delay" between each access to the i/o ports. Each protocol sets
184 a default value for this delay. In most cases, the user can override
185 the default and set it to 0 - resulting in somewhat higher transfer
186 rates. In some rare cases (especially with older 486 systems) the
187 default delays are not long enough. if you experience corrupt data
188 transfers, or unexpected failures, you may wish to increase the
189 port delay.
190
191 3.3 Some drives need a printer reset
192 -------------------------------------
193
194 There appear to be a number of "noname" external drives on the market
195 that do not always power up correctly. We have noticed this with some
196 drives based on OnSpec and older Freecom adapters. In these rare cases,
197 the adapter can often be reinitialised by issuing a "printer reset" on
198 the parallel port. As the reset operation is potentially disruptive in
199 multiple device environments, the pata_parport drivers will not do it
200 automatically. You can however, force a printer reset by doing::
201
202 insmod lp reset=1
203 rmmod lp
204
205 If you have one of these marginal cases, you should probably build
206 your pata_parport drivers as modules, and arrange to do the printer reset
207 before loading the pata_parport drivers.
208

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Parallel-port IDE 구조와 지원 protocol

1-82

이 문서는 PARIDE v1.03(1997-1998, Grant Guenther <[email protected]>)과 PATA_PARPORT(2023, Ondrej Zary)의 Linux parallel-port IDE 지원을 설명합니다.

Personal computer의 parallel port가 단순하고 거의 보편적이어서 portable hard disk, CD-ROM, LS-120, tape drive 같은 외장 device가 host 연결에 사용했습니다. Scanner 일부는 ad-hoc command/data 방식을 쓰지만, 외장 device 대부분은 internal model에 parallel-port adapter chip을 더한 형태입니다.

초기 adapter 일부는 ZIP drive의 Iomega PPA-3처럼 SCSI bus를 multiplex했습니다. 현재 설계는 외장 device에 작은 ISA 또는 IDE bus를 재현하고 protocol이 device-register read/write와 data-block transfer operation을 제공합니다. NCR 5380 같은 standard SCSI controller를 parallel cable로 연결하기도 하고, `ditto` tape family는 ISA replicator로 floppy controller와 floppy-tape mechanism을 연결합니다.

그러나 대부분은 intermediate controller가 필요 없는 standard IDE device입니다. Parallel-port CD-ROM을 열면 standard ATAPI CD-ROM, power supply, PC parallel cable과 IDE cable을 잇는 adapter 하나가 있습니다. 보통 IDE interface의 다른 device로 CD-ROM을 교체할 수도 있습니다.

이 문서는 parallel-port IDE만 다루며 parallel-port SCSI, `ditto` tape drive, scanner는 제외합니다. MicroSolutions backpack 계열, SyQuest EZ/SparQ, Avatar Shark, Imation·Maxell LS-120, FreeCom Power CD, HP 5/8GB tape와 7100/7200 CD-RW를 포함해 많은 clone/no-name 제품을 지원합니다.

Parallel-port IDE adapter architecture
Host parallel portAdapter communication protocolAdapter-replicated IDE busStandard IDE/ATAPI device
Older designsSCSI bus multiplexer or ISA replicatorSCSI/floppy controller

외장 case 안에서 parallel protocol이 standard IDE/ATAPI bus를 재현합니다.

`pata_parport`는 두 부분으로 나뉩니다. Base `pata_parport` module은 kernel libata interface, registry와 parallel-port 공통 접근 method를 제공합니다. 두 번째는 adapter chip별 low-level protocol driver set입니다.

PATA_PARPORT protocol drivers
ProtocolAdapterRegion
atenATEN EH-100HK
bpckMicrosolutions backpackUS
commDataStor old-type commuterTW
dstrDataStor EP-2000TW
epatShuttle EPATUK
epiaShuttle EPIAUK
fit2FIT TD-2000US
fit3FIT TD-3000US
friqFreecom IQ cableDE
frpwFreecom PowerDE
kbicKingByte KBIC-951A and KBIC-971ATW
kttiKT Technology PHd adapterSG
on20OnSpec 90c20US
on26OnSpec 90c26US

지원 protocol 이름, adapter와 원 개발 지역입니다.

Pata_parport 선택·probe·device 관리

83-165

Kernel configuration에서 pata_parport driver를 built-in 또는 module로 선택할 수 있습니다. 두 경우 모두 `Parallel port IDE device support`와 최소 하나의 parallel-port communication protocol을 선택해야 합니다.

Drive adapter 종류를 모르면 DOS installation floppy의 filename/text file 또는 adapter chip marking을 확인합니다. 모든 protocol module을 선택해 subsystem이 전부 시도하게 할 수도 있습니다.

Brand-name device protocols
ManufacturerModelProtocol
MicroSolutionsCD-ROMbpck
MicroSolutionsPD drivebpck
MicroSolutionsHard drivebpck
MicroSolutions8000t tapebpck
SyQuestEZ, SparQepat
ImationSuperdiskepat
MaxellSuperdiskfriq
AvatarSharkepat
FreeComCD-ROMfrpw
Hewlett-Packard5GB Tapeepat
Hewlett-Packard7200e CDepat
Hewlett-Packard7200e CD-Repat

문서에 명시된 manufacturer/model별 low-level protocol입니다.

`probe=0` parameter를 사용하지 않으면 모든 parport와 protocol driver를 자동 probe합니다. 따라서 Imation SuperDisk는 `modprobe epat`만으로 동작합니다.

Device를 수동 생성할 때 `/sys/bus/pata_parport/new_device`에 다음 5-field string을 씁니다.

Manual device creation::

	# echo "port protocol mode unit delay" >/sys/bus/pata_parport/new_device

where:

	======== ================================================
	port	 parport name (or "auto" for all parports)
	protocol protocol name (or "auto" for all protocols)
	mode	 mode number (protocol-specific) or -1 for probe
	unit	 unit number (for backpack only, see below)
	delay	 I/O delay (see troubleshooting section below)
	======== ================================================
new_device fields
FieldMeaning
portParport name 또는 모든 port를 뜻하는 auto
protocolProtocol name 또는 모든 protocol을 뜻하는 auto
modeProtocol-specific mode number, probe는 -1
unitBackpack 전용 unit number
delayI/O port access delay

끝 field를 생략하면 default를 사용합니다.

MicroSolutions backpack은 drive마다 unit ID가 필요하며 보통 serial number 마지막 두 자리입니다. 정확한 값은 MicroSolutions 문서를 확인합니다.

예제는 모든 port/protocol probe, `parport0`의 `epat` mode 4(EPP-16), `parport0`의 모든 protocol, 모든 port의 `epat` probe를 보여 줍니다. Device 삭제는 `delete_device`에 name을 씁니다.

If you omit the parameters from the end, defaults will be used, e.g.:

Probe all parports with all protocols::

	# echo auto >/sys/bus/pata_parport/new_device

Probe parport0 using protocol epat and mode 4 (EPP-16)::

	# echo "parport0 epat 4" >/sys/bus/pata_parport/new_device

Probe parport0 using all protocols::

	# echo "parport0 auto" >/sys/bus/pata_parport/new_device

Probe all parports using protoocol epat::

	# echo "auto epat" >/sys/bus/pata_parport/new_device

Deleting devices::

	# echo pata_parport.0 >/sys/bus/pata_parport/delete_device
PATA_PARPORT probe selection
echo autoAll parportsAll protocolsProbe modes
parport0 autoOne parportAll protocolsProbe
auto epatAll parportsEPAT onlyProbe
parport0 epat 4One parportEPAT mode 4Create device

Auto와 explicit field가 탐색 범위를 좁힙니다.

Troubleshooting: EPP mode

166-177

Pata_parport 문제 중 가장 흔한 것은 parallel-port CMOS setting입니다. 현재 protocol module은 ECP mode 또는 ECP combination mode를 지원하지 않습니다. 가능하면 CMOS setup에서 parallel port를 EPP mode로 설정합니다.

Parallel-port modes
ModeStatus
EPP권장
ECP지원하지 않음
ECP combination modes지원하지 않음

PATA_PARPORT에서 권장·비지원하는 mode입니다.

Troubleshooting: port delay

178-190

일부 parallel port는 full speed data transfer가 안정적이지 않습니다. Protocol module은 error를 줄이기 위해 I/O port access 사이에 `port delay`를 넣고 protocol마다 default를 정합니다.

대부분은 default를 0으로 override해 transfer rate를 조금 높일 수 있습니다. 반대로 오래된 486 system 같은 드문 경우 default delay가 부족하므로 data corruption이나 예상 밖 failure가 나면 port delay를 늘립니다.

Tune port delay
Stable at defaultTry delay 0Higher transfer rate
Corrupt data or failuresIncrease delayMore reliable port accesses

속도와 신뢰성 사이에서 delay를 조정합니다.

Troubleshooting: printer reset

191-207

OnSpec 또는 오래된 Freecom adapter 기반 일부 no-name 외장 drive는 power-up이 항상 올바르지 않습니다. 이때 parallel port에 `printer reset`을 발행하면 adapter를 다시 initialize할 수 있습니다.

Reset은 multiple-device environment를 방해할 수 있으므로 pata_parport driver가 자동 실행하지 않습니다. 다음처럼 `lp` module을 잠깐 load해 강제합니다.

automatically.  You can however, force a printer reset by doing::

	insmod lp reset=1
	rmmod lp

이런 marginal case에서는 pata_parport driver를 module로 build하고 driver를 load하기 전에 printer reset을 수행하도록 구성하는 편이 좋습니다.

Reset a marginal adapter
External drive powers up incorrectlyinsmod lp reset=1rmmod lpLoad pata_parport protocol driver

Pata_parport driver보다 먼저 lp reset을 수행합니다.