SimpleTech USB HDD driver

Peter Jeremy peterjeremy at optushome.com.au
Thu Sep 25 02:43:57 PDT 2003


On Wed, Sep 24, 2003 at 11:38:59PM +0100, Scott Mitchell wrote:
>No idea why both 6 byte and 10 byte commands exist.  No doubt someone out
>there knows the historical background to it all.

If my memory serves correctly, SCSI started off as SASI - developed
by Shugart Associates for some marketing reason or other.  It met a
need and was clean enough that other vendors started supporting it.
Eventually, ANSI standardised it.  It was never designed to be a
future-proof storage interface that would underpin the world's low
to mid-range server market.

In the beginning there were 6-byte commands.  These were limited to
21-bit block numbers but since no-one would ever have devices with
more than 2^21 blocks (typically 1GB) there was no need to allow for
a larger block number - which would make the command larger and slower
to transfer to the target.

Of course the first people to experiment with "large" (>1GB) disks
discovered a fairly serious disadvantage of 6-byte commands when the
top bit of the block number got lopped off and the outside tracks of
the disk (boot-block, primary or only superblock etc) got over-written
by data intended for the inside tracks.

10-byte commands were therefore introduced.  These extended the block
number to 32 bits and allowed a larger transfer size as well.  And
the limits of 32-bit block numbers are now being reached and longer
commands have been defined to allow for bigger storage devices.

6-byte commands still have an advantage for transfers that fit within
their limits (block number and transfer size) - they are smaller and
therefore faster to transfer.  SCSI commands (and command responses)
must be transferred asynchronously and USB 1.x is fairly slow so the
less data to transfer the better.

Peter


More information about the freebsd-hackers mailing list