FreeBSD Handbook : Managing hardware : SCSI
Previous: * Adding and reconfiguring disks
Next: Components of SCSI

9.2. SCSI

Copyright (c) 1995, Wilko Bulte <wilko@yedi.iaf.nl> .
3 September 1995.

SCSI is an acronym for Small Computer Systems Interface. It is an ANSI standard that has become one of the leading I/O buses in the computer industry. The foundation of the SCSI standard was laid by Shugart Associates (the same guys that gave the world the first mini floppy disks) when they introduced the SASI bus (Shugart Associates Standard Interface).

After some time an industry effort was started to come to a more strict standard allowing devices from different vendors to work together. This effort was recognized in the ANSI SCSI-1 standard. The SCSI-1 standard (approx 1985) is now more or less obsolete. The current standard is SCSI-2 (see Further reading ), with SCSI-3 on the drawing boards.

In addition to a physical interconnection standard, SCSI defines a logical (command set) standard to which disk devices must adhere. This standard is called the Common Command Set (CCS) and was developed more or less in parallel with ANSI SCSI-1. SCSI-2 includes the (revised) CCS as part of the standard itself. The commands are dependent on the type of device at hand. It does not make much sense of course to define a Write command for a scanner.

The SCSI bus is a parallel bus, which comes in a number of variants. The oldest and most used is an 8 bit wide bus, with single-ended signals, carried on 50 wires. (If you don't know what single-ended means, don't worry, that is what this document is all about.) Modern designs also use 16 bit wide buses, with differential signals. This allows transfer speeds of 20Mbytes/second, on cables lengths of up to 25 meters. SCSI-2 allows a maximum bus width of 32 bits, using an additional cable.

Of course the SCSI bus not only has data lines, but also a number of control signals. A very elaborate protocol is part of the standard to allow multiple devices to share the bus in an efficient manner. In SCSI-2, the data is always checked using a separate parity line. In pre-SCSI-2 designs parity was optional.

In SCSI-3 even faster bus types are introduced, along with a serial SCSI bus that reduces the cabling overhead and allows a higher maximum bus length.

As you could have guessed from the description above, SCSI devices are intelligent. They have to be to adhere to the SCSI standard (which is over 2 inches thick BTW). So, for a hard disk drive for instance you do not specify a head/cylinder/sector to address a particular block, but simply the number of the block you want. Elaborate caching schemes, automatic bad block replacement etc are all made possible by this 'intelligent device' approach.

On a SCSI bus, each possible pair of devices can communicate. If their function allows this is another matter, but the standard does not restrict it. To avoid signal contention, the 2 devices have to arbitrate for the bus before using it.

The philosophy of SCSI is to have a standard that allows older-standard devices to work with newer-standard ones. So, an old SCSI-1 device should normally work on a SCSI-2 bus. Normally, because it is not absolutely sure that the implementation of an old device follows the (old) standard closely enough to be acceptable on a new bus. Modern devices are usually more well-behaved, because the standardization has become more strict and is better adhered to by the device manufacturers. Generally speaking, the chances of getting a working set of devices on a single bus is better when all the devices are SCSI-2 or newer. This does not imply that you have to dump all your old stuff when you get that shiny 2Gb disk: I own a system on which a pre-SCSI-1 disk, a SCSI-2 QIC tape unit, a SCSI-1 helical scan tape unit and 2 SCSI-1 disks work together quite happily.

9.2.1. Components of SCSI

9.2.1.1. SCSI bus types
9.2.1.2. Terminators
9.2.1.3. Terminator power
9.2.1.4. Device addressing
9.2.1.5. Bus layout

9.2.2. Using SCSI with FreeBSD

9.2.2.1. About translations, BIOSes and magic...
9.2.2.2. SCSI subsystem design
9.2.2.3. Kernel configuration
9.2.2.4. Tuning your SCSI kernel setup
9.2.2.5. Rogue SCSI devices
9.2.2.6. Busmaster host adapters

9.2.3. Tracking down problems

9.2.4. Further reading


FreeBSD Handbook : Managing hardware : SCSI
Previous: * Adding and reconfiguring disks
Next: Components of SCSI