📄 paride.txt
字号:
Linux and parallel port IDE devicesPARIDE v1.03 (c) 1997-8 Grant Guenther <grant@torque.net>1. IntroductionOwing to the simplicity and near universality of the parallel port interfaceto personal computers, many external devices such as portable hard-disk,CD-ROM, LS-120 and tape drives use the parallel port to connect to theirhost computer. While some devices (notably scanners) use ad-hoc methodsto pass commands and data through the parallel port interface, most external devices are actually identical to an internal model, but witha parallel-port adapter chip added in. Some of the original parallel portadapters were little more than mechanisms for multiplexing a SCSI bus.(The Iomega PPA-3 adapter used in the ZIP drives is an example of thisapproach). Most current designs, however, take a different approach.The adapter chip reproduces a small ISA or IDE bus in the external deviceand the communication protocol provides operations for reading and writingdevice registers, as well as data block transfer functions. Sometimes,the device being addressed via the parallel cable is a standard SCSIcontroller like an NCR 5380. The "ditto" family of external tapedrives use the ISA replicator to interface a floppy disk controller,which is then connected to a floppy-tape mechanism. The vast majorityof external parallel port devices, however, are now based on standardIDE type devices, which require no intermediate controller. If onewere to open up a parallel port CD-ROM drive, for instance, one wouldfind a standard ATAPI CD-ROM drive, a power supply, and a single adapterthat interconnected a standard PC parallel port cable and a standardIDE cable. It is usually possible to exchange the CD-ROM device withany other device using the IDE interface. The document describes the support in Linux for parallel port IDEdevices. It does not cover parallel port SCSI devices, "ditto" tapedrives or scanners. Many different devices are supported by the parallel port IDE subsystem, including: MicroSolutions backpack CD-ROM MicroSolutions backpack PD/CD MicroSolutions backpack hard-drives MicroSolutions backpack 8000t tape drive SyQuest EZ-135, EZ-230 & SparQ drives Avatar Shark Imation Superdisk LS-120 Maxell Superdisk LS-120 FreeCom Power CD Hewlett-Packard 5GB and 8GB tape drives Hewlett-Packard 7100 and 7200 CD-RW drivesas well as most of the clone and no-name products on the market.To support such a wide range of devices, PARIDE, the parallel port IDEsubsystem, is actually structured in three parts. There is a baseparide module which provides a registry and some common methods foraccessing the parallel ports. The second component is a set of high-level drivers for each of the different types of supported devices: pd IDE disk pcd ATAPI CD-ROM pf ATAPI disk pt ATAPI tape pg ATAPI generic(Currently, the pg driver is only used with CD-R drives).The high-level drivers function according to the relevant standards.The third component of PARIDE is a set of low-level protocol driversfor each of the parallel port IDE adapter chips. Thanks to the interestand encouragement of Linux users from many parts of the world, support is available for almost all known adapter protocols: aten ATEN EH-100 (HK) bpck Microsolutions backpack (US) comm DataStor (old-type) "commuter" adapter (TW) dstr DataStor EP-2000 (TW) epat Shuttle EPAT (UK) epia Shuttle EPIA (UK) fit2 FIT TD-2000 (US) fit3 FIT TD-3000 (US) friq Freecom IQ cable (DE) frpw Freecom Power (DE) kbic KingByte KBIC-951A and KBIC-971A (TW) ktti KT Technology PHd adapter (SG) on20 OnSpec 90c20 (US) on26 OnSpec 90c26 (US)2. Using the PARIDE subsystemWhile configuring the Linux kernel, you may choose either to buildthe PARIDE drivers into your kernel, or to build them as modules.In either case, you will need to select "Parallel port IDE device support"as well as at least one of the high-level drivers and at least oneof the parallel port communication protocols. If you do not knowwhat kind of parallel port adapter is used in your drive, you couldbegin by checking the file names and any text files on your DOS installation floppy. Alternatively, you can look at the markings onthe adapter chip itself. That's usually sufficient to identify thecorrect device. You can actually select all the protocol modules, and allow the PARIDEsubsystem to try them all for you.For the "brand-name" products listed above, here are the protocoland high-level drivers that you would use: Manufacturer Model Driver Protocol MicroSolutions CD-ROM pcd bpck MicroSolutions PD drive pf bpck MicroSolutions hard-drive pd bpck MicroSolutions 8000t tape pt bpck SyQuest EZ, SparQ pd epat Imation Superdisk pf epat Maxell Superdisk pf friq Avatar Shark pd epat FreeCom CD-ROM pcd frpw Hewlett-Packard 5GB Tape pt epat Hewlett-Packard 7200e (CD) pcd epat Hewlett-Packard 7200e (CD-R) pg epat2.1 Configuring built-in driversWe recommend that you get to know how the drivers work and how toconfigure them as loadable modules, before attempting to compile akernel with the drivers built-in.If you built all of your PARIDE support directly into your kernel,and you have just a single parallel port IDE device, your kernel shouldlocate it automatically for you. If you have more than one device,you may need to give some command line options to your bootloader(eg: LILO), how to do that is beyond the scope of this document.The high-level drivers accept a number of command line parameters, allof which are documented in the source files in linux/drivers/block/paride.By default, each driver will automatically try all parallel ports itcan find, and all protocol types that have been installed, until it findsa parallel port IDE adapter. Once it finds one, the probe stops. So,if you have more than one device, you will need to tell the drivershow to identify them. This requires specifying the port address, theprotocol identification number and, for some devices, the drive'schain ID. While your system is booting, a number of messages aredisplayed on the console. Like all such messages, they can bereviewed with the 'dmesg' command. Among those messages will besome lines like: paride: bpck registered as protocol 0 paride: epat registered as protocol 1The numbers will always be the same until you build a new kernel withdifferent protocol selections. You should note these numbers as youwill need them to identify the devices.If you happen to be using a MicroSolutions backpack device, you willalso need to know the unit ID number for each drive. This is usuallythe last two digits of the drive's serial number (but read MicroSolutions'documentation about this).As an example, let's assume that you have a MicroSolutions PD/CD drivewith unit ID number 36 connected to the parallel port at 0x378, a SyQuest EZ-135 connected to the chained port on the PD/CD drive and also an Imation Superdisk connected to port 0x278. You could give the following options on your boot command: pd.drive0=0x378,1 pf.drive0=0x278,1 pf.drive1=0x378,0,36In the last option, pf.drive1 configures device /dev/pf1, the 0x378is the parallel port base address, the 0 is the protocol registrationnumber and 36 is the chain ID.Please note: while PARIDE will work both with and without the PARPORT parallel port sharing system that is included by the"Parallel port support" option, PARPORT must be included and enabledif you want to use chains of devices on the same parallel port.2.2 Loading and configuring PARIDE as modulesIt is much faster and simpler to get to understand the PARIDE driversif you use them as loadable kernel modules. Note 1: using these drivers with the "kerneld" automatic module loadingsystem is not recommended for beginners, and is not documented here. Note 2: if you build PARPORT support as a loadable module, PARIDE mustalso be built as loadable modules, and PARPORT must be loaded before thePARIDE modules.To use PARIDE, you must begin by insmod paridethis loads a base module which provides a registry for the protocols,among other tasks.Then, load as many of the protocol modules as you think you might need.As you load each module, it will register the protocols that it supports,and print a log message to your kernel log file and your console. For example: # insmod epat paride: epat registered as protocol 0 # insmod kbic paride: k951 registered as protocol 1 paride: k971 registered as protocol 2Finally, you can load high-level drivers for each kind of device thatyou have connected. By default, each driver will autoprobe for a single device, but you can support up to four similar devices by giving their
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -