paride.rst 8.4 KB

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