SCSI - A Game With Many Rules and no Rulebook? Version 1.42 Copyright Gary Field, 1994-2000 - All rights reserved. Special Internet edition - Freely distributable for non-commercial use. Author: Gary Field (gfield@zk3.dec.com) - SCSI hacker since 1985 With a little help from my friends. Last Updated: September 5, 2000 Trademarks: MSDOS and Windows are trademarks of Microsoft Corp. Unix is a trademark of X/Open Ltd. Netware is a trademark of Novell Corp. OS/2 is a trademark of IBM Corp. Disclaimer: For external use only. If heartache and nausea persist, discontinue use. Enough with the legal mumbo-jumbo already! Deskstar Wars(part I): Luke: I need a new PC Ben. But I'm having trouble deciding whether to spend the extra for SCSI or just get IDE. Obi-wan: Luke, clear your mind! Don't be tempted by the dark side. Luke: But it's a lot cheaper! Obi-wan: That's just what the Empire wants you to think! Look to the future. How will you connect a scanner or CD-R? Surely you can't tell me you're willing to use an ATAPI tape drive. Luke: Why not? Lots of people use them. How bad can they be? Obi-wan: This is worse than I thought! The Emperor is very powerful. You must go to Degobah at once. Yoda will rekindle the fire of multi-tasking within you. R2 - Keep him from buying anything until he's seen the light. (To be continued...) So you want to play SCSI eh? Be warned, the rewards are great, but the road is rough. The rules of the SCSI game: o Each SCSI device needs to have a unique identifier (ID) from 0 to 7. (0-15 or 0-31 if playing WIDE SCSI) The host adapter is usually given ID 7. Each device must have a different ID. o It makes no difference what order devices are connected to the bus in. Any ID can be in any position on the bus. o There must be exactly two terminators for the SCSI bus, and they must be at the extreme ends of the bus. If you are playing the FAST SCSI game (meaning that you have a host adapter that handles the FAST protocol and at least one device that uses FAST mode), then you need to use active terminators. See discussions about terminator types in the SCSI FAQ list. With WIDE SCSI, you have the additional joy of worrying about both halves of the bus. If you have any narrow devices attached (and you will), you need to make sure that both the upper byte and lower byte are both terminated, but only at their respective ends. o The total length of all SCSI cabling must be less than 20 feet (6 m) (75 feet (25 m) in the differential version of the game). Or less than 3 meters for FAST or less than 1.5 meters for Ultra with special dispensation of 12 meters for LVD (Ultra2 and Ultra3). (Except on Tuesdays when it's a Royal Fizbin!) o The cables must flow continuously from one device to the next. No stubs more than 3" (.1 m) long are permitted. (SCSI signals are not real bright and if you give them more than one way to go they'll get totally confused and wander aimlessly around the bus bumping into each other). o For minimum trouble with FAST and Ultra busses, keep devices (which inevitably contain small stubs) spaced at least .3 meters apart on the cable. Spacing them at un-even intervals is best to avoid resonant reflection re-enforcement. Yes, this does limit you to about 5 devices for Single-Ended UltraSCSI. o All cables used must have an AC impedance of about 90 Ohms. This is a tough one! Short of connecting your cables to a RF impedance meter, you need to have faith on this one. Get your cables from a vendor that knows SCSI well. Tip: If you keep the cables really short (like < 2 feet(.6 m) total), you can get away with murder. o For best reliability, all cables should consist of twisted pairs for each SCSI signal. This is not optional in the FAST/Ultra version. (for the uninformed, a twisted pair is two wires that are twisted together to form a transmission line, and not two people who are into kinky stuff) o A player may mix flat and round cable as long as the previous five rules are not violated. In the FAST and Ultra versions you really need to keep such transitions to an absolute minimum. o Devices may be located internal or external to the system's case. The simplest situation being all internal or all external, but mixing is allowed IF all above rules are followed to the letter. o At least one device MUST supply power to the TERMPWR line on the SCSI bus. (see local rules for important details) Local rules: o Supplying TERMPWR is usually considered the responsibility of the host adapter. This TERMPWR voltage must be between 4.25V and 5.25V with both terminators attached to the bus. If your bus seems to work most of the time, but is intermittent, get out the scope or Voltmeter and check that TERMPWR is within the above range. In addition, the presence of any noise pulses on TERMPWR will really screw things up. Some external terminators include a capacitor to help reduce noise. PCMCIA host adapters have deemed themselves exempt from this responsibility and therefore if using one, you need to make other arrangements for TERMPWR. o It is assumed that all devices are connected to power supplies that can fully satisfy all the device's power requirements (even during the device's peak load). Also, avoid ground loops by plugging the system and all external devices into the same outlet if possible. These two rules are often overlooked and can result in severe hair loss. o Some vendors may require that any hard disks to be supported by the PC BIOS (Int 13h) interface, be given ID 0 and ID 1 respectively. Check your manual for this one. o Because of the nature of the PC BIOS INT 13h interface, users with drives larger than 1024 Mbytes (one Gig), should prepare for extra fun. (see the comp.periphs.scsi FAQ for details) o Disks larger than 8 GB require a host adapter BIOS with "INT 13 extensions" in order to be recognized at their full capacity. o Disks formatted using one SCSI adapter cannot necessarily be moved to another adapter without re-formatting. I'm referring to the hgher level formatting here (FORMAT.EXE under MSDOS). This is because the various vendors didn't standardize on a CYL, HD, SECT to SCSI LBA translation algorithm. (So that's why they told me to buy a tape drive!) o Some software will allow devices to be powered on only when needed. Other software, may require all devices to be powered on when the system is started. It is recommended that you start out with all devices on until you get everything working. o Some devices power up/down cleanly and will not disturb a running SCSI bus, others do not. If you tell the doctor "It hurts when I do this", he may well reply "Then don't do that". o Most vendors properly key the 50 pin connector on the device, however, it shall be the responsibility of the player to make sure that pin 1 is really connected to pin 1 everywhere. o Smoking is a bad idea, even for SCSI devices. Some vendors don't provide a fuse in the TERMPWR line. Forwarned is forearmed. I'm personally very partial to those polymer self healing fuses! If you bought a device or adapter from a company that was too stupid to include current limiting on the TERMPWR line, by all means put one of those babies on there. You want one rated for about 1.1 Amps hold current with < .2 Ohms of resistance. o SCSI vendors should provide connectors that are called for in the ANSI SCSI spec's. Some will try to pass off 25 pin connectors on unsuspecting players. These vendors need a good slap. Feel free to harrass and ridicule them at every opportunity. o Connecting and disconnecting devices to/from a system while it is powered on is seriously discouraged. It is strictly verboten on any system that caches disk operations (like Unix) since you don't know when bus activity might occur. A word to the wise should be sufficient on this one. o A SCSI device mounted in an external case needs two connectors so that proper bus chaining can be maintained. In an apparent attempt at sick humor, A small number of vendors have played a joke on their customers by supplying only one connector. If you are a victim of this joke, you need to put this abomination at one end of your bus. "Flow-through" terminators are available to help solve the termination problem. Hopefully, you haven't fallen for this prank more than once! (Fool me once - shame on you. Fool me twice - shame on me!) o While the SCSI spec. indicates that a device with ID 7 will get highest priority during bus arbitration, this rarely needs to be considered. You might start thinking that you would like your hard disks to be at the highest IDs. Well, here's where reality sets in - some SCSI adapter vendors require that the disks be given ID 0 and ID 1. The bottom line is - Don't sweat the small stuff! Except in high performance systems with busses fully loaded with well implemented SCSI devices, you probably wouldn't notice the difference anyway. It also may not be intuitively obvious that you want slower but timing critical devices (like CD-R and tape drives) to have higher priority. If the fastest devices have the highest priority, nothing else will be able to get on the bus. A word about fair play: o Please don't use unshielded cables for SCSI connections outside your computer's case. Many of us use the radio spectrum for something other than a trash heap. Keep your SCSI signals to yourself, no-one else wants them. If it makes you feel any better, the shielding will also help keep your microwave oven and hair dryer from talking to your disks. They rarely say anything worth listening to. The object of the game: o A player must construct a working SCSI bus using the devices and adapters supplied to him by multiple vendors. o This SCSI bus should be no longer than necessary to attach all the given devices. Wive's tales: o Some players will tell you that they needed to connect a third terminator or only use one instead of the required two. These players do not realize that these symptoms are the result of having broken one or more of the other rules. Sometimes, plugging in terminator resistor packs backwards or using cables of too low impedance can fool these players into thinking these things are necessary. Forgive them, for they know not what they're doing. Remember there aren't very many experts in real life, but there is a real abundance on the Internet! Judging: o The computer will be the final judge of adherence to all of the above rules. o The SCSI game is unusual in that everyone can win! (Well, at least those who are smart enough not to buy IDE devices) The above rules only cover the hardware aspects of SCSI. Without software, you'll undoubtedly find that your newly constructed SCSI bus is rather boring. Software is a whole 'nother game! ---------- SCSI software game: (Also called DRIVERS) Completion of the above hardware game is a pre-requisite. A little history of the game: Whereas the SCSI hardware game has strict rules, the SCSI drivers game has been pretty much a free-for-all. Once, there was total chaos in the land of SCSI. Each vendor provided driver software for the specific devices it decided to support. If a player later decided he wanted to attach a device that was not deemed valuable by their chosen vendor, tough! And to make sure that a player would not write his own drivers, these vendors would not provide interface spec's for their host adapters. All vendors supported hard disks, but attaching tapes, or CDROMs was not for the faint of heart. One wise vendor called Adaptec, eventually heard the wailing cries of it's customers and decreed that henceforth SCSI drivers would talk to their host adapters via a protocol to be known as ASPI (Adaptec SCSI Programming Interface). Since ASPI was deemed by many to be too simple for serious players, the ANSI committee came to the rescue with their CAM (Common Access Method). (Unfortunately, they were a little slow in arriving and most players had already learned to live with ASPI). These driver interface definitions changed the SCSI software game forever! Modern players in SCSI software are frequently heard reverently speaking these acronyms. The ASPI definition covers MSDOS, Windows, Win32 (95 and NT), OS/2, and Netware. CAM covers Unix in addition to these. Still, selection of one of these standards is something of a religious act of faith. NCR (Now Symbios Logic (Now LSI Logic)) wisely chose to support both by implementing CAM as their native interface and creating an ASPI interface that goes down through CAM to the adapter. (CAM cannot be implemented on top of ASPI since CAM is a super-set of ASPI.) [News Flash!!! Adaptec attempted to buy their only real competitor, Symbios Logic; However the FTC smacked them up beside the head and told them they couldn't! Now LSI Logic owns Symbios. These days, in the MSDOS/Windows world, selection of SCSI software is pretty much a matter of choosing ASPI or CAM and remaining true to your selection. In the Unix world, make sure your Unix vendor supports the devices you need or be prepared to write a driver yourself (lots of fun for the whole family)! It is rather disappointing that out of all the major Unix vendors, only DEC (Now Compaq) chose to implement CAM as their SCSI environment. Even the Linux developers did their own thing. (Particularly sad since CAM was available when Linux was being developed). FreeBSD however did use CAM in their SCSI subsystem. And so the disks, the tapes and the CDROM all ran happily ever after and DAT's the end of the story... If you think you're ready for real fun, be sure to pick up a copy of the comp.periphs.scsi FAQ Now in new HTML flavor! (The classic text flavor has been discontinued due to lack of interest; i.e. I only got two requests for it.) (A pointer to the FAQ is posted to Usenet comp.periphs.scsi newsgroup during the first week of each month (and other times too) ) You can get your own copy from: http://www.scsifaq.org/ OR http://fieldnet.ne.mediaone.net/SCSI_FAQ/ Don't forget to buy a copy of "The Book of SCSI: I/O for the New Millennium" on your way out: http://books.scsifaq.com/ Parting shot: Beware the March of IDEs! Individually we're scuzzy, together we're scum! Don't forget - The early write eats up the WORM! No sir, the terminator will not make your SCSI bus stop running. Yes, I'm afraid that even single-ended SCSI busses need terminators at both ends. User#1: I just bought myself a new CDROM drive. User#2: Is is scuzzy? User#1: Of course not, it's a really nice one! -------- Don't forget to snigger up your sleeve at your friends who use IDE devices. You can remain smug in the knowledge that the performance of their systems will be less than yours while doing backups, balancing the household budget, replying to the month's email queue and playing Doom simultaneously. The only reason that IDE stuff is still cheaper is because it was cheaper initially and those damned unsophisticated DOS running wimps don't appreciate a good I/O system when they see one grumble, grumble, sniff ... THE END