9fans archive / 1995 / 12 / 33 /    prev next

From: jim mckie  jmk@pla...
Subject: Adding pcdist to CD-ROM file system?
Date: Sun, 10 Dec 1995 10:49:57 -0500

The slave/master jumper may have been a factor. Early ATA 'standards' (for
want of a better word) forbade a slave without a master. The later ones say
it's possible but do not sanction it. The way the ATA driver currently looks
for drives is to use the 'execute device diagnostics' command then look at the
status for the master and then the slave. Because of problems with some
controllers i found it not advisable to try look at the status of the slave if
the master doesn't exist.

The mapping between ATA controller number, port and drive number is fixed:
	primary		port 0x3F0	drives 0, 1
	secondary	port 0x1F0	drives 2, 3
	tertiary	port 0x1E8	drives 4, 5
	quaternary	port 0x168	drives 6, 7
This means there can be 'holes' in the drive name space.
Although it is part of the ATA driver, ATAPI drives are named differently
to not confuse them with hard drives. For example, with one hard drive on
the primary and a CD-ROM on the secondary the drives are named
	/dev/hd0disk
	/dev/atapi2disk