
USB Mass Storage and USB-Attached SCSI Are Both SCSI - hlandau
https://www.devever.net/~hl/usbuas
======
xenadu02
SCSI rules the world I guess.

ATAPI tunneled SCSI commands over PATA for CD drives and other such things.

AFAIK SATA uses the SCSI command set too (as does Serial Attached SCSI
obviously). To the point that most SAS controllers can also run SATA drives
without issue.

Apparently USB mass storage also uses SCSI in both BOT and UAS forms.

Sometimes a protocol is designed so well to fit its purpose yet just flexible
enough to support future use cases that there is no need to replace it. Hats
off to the original designers of the SCSI command set.

~~~
tlack
Some protocols have so much persistence, where others seem to be tied to one
vendor's fate.

I wonder if its worth spending some time trying to understand what makes some
protocols so robust and widely adopted. It's not just being open vs closed.

A few other examples:

    
    
      - PostScript (probably) / PDF (iffy)
      - CAN (adaptable)
      - G-code
      - Serial
      - HTTP
      - HTML (sort of, badly)
      - VNC (maybe)
      - JSON (for now)

~~~
msla
Hayes command set, as expanded from land-line modems to GSM cell phones:

[https://en.wikipedia.org/wiki/Hayes_command_set](https://en.wikipedia.org/wiki/Hayes_command_set)

------
tjr
Years ago, I think when I was still using a Commodore Amiga system, I went
into a computer shop in St. Louis to see if they had any SCSI drives.

The clerk at the store went off on this surprisingly lengthy and heated
diatribe about how SCSI was mediocre technology, and how nobody in their right
mind should ever want anything SCSI ever again.

I kind of miss that sort of passion in computer store clerks.

~~~
UI_at_80x24
Passion related to computers as a hobby is the thing I miss. Once upon a time
if your were "into computers" that meant something, now everybody thinks that
they are into computers. "Like facebook right?" <eye-twitch>

My first x86 PC had a 425MB SCSI-II hard-drive and a "triple Speed" (3x) CD-
ROM. Having a SCSI drive with a seek time of UNDER 11ms was enough to blow the
doors off of every other computer I came across (IIRC 4ms was the actual time
vs 11ms for most other 120MB HD's at the time.)

Everything about SCSI was cool. Over powered, over engineered, and willing to
take abuse better then anything else.

It was an AMD 386DX-40, 8MB of RAM, a VGA-Wonder XL video card, a Logitech bus
mouse, soundblaster, and 2 modems; 14.4 & a 56k USR.

AND I ran linux on it. Well I could install linux, and couldn't really figure
out what to do with it after that. But Even back then Linux detected
EVERYTHING, and it was FAST.

~~~
geerlingguy
The main thing I remember (I didn't worry as much about performance back then)
was when I was grabbing a replacement from a pile of ribbon cables we had in a
box, the wider ones were for SCSI, the narrower ones for IDE.

Then SCSI-II and SCSI-III and ATAPI/UATA/PATA cables came along and started
making the ease-of-identification based on just visual traits a lot more
difficult.

------
jasoneckert
In the early days of USB, I sat through a presentation from a portable storage
vendor at Comdex. They specifically made a point to mention that their
external USB storage was seen by the operating system as a SCSI device because
SCSI support was widely implemented by all operating systems at the time
without having to install additional software.

Perhaps ubiquitous OS support was one of the main driving forces behind the
SCSI protocol being adopted by so many technologies since.

------
rektide
I wonder what would change if we tried to nvme-ify.

In the meantime I hope USB4 with pcie takes off. AMD needs to make it happen.
Not enough mobile chip makers about for them to try to be competitive & throw
in support on cell phones, not till 2026l5 or so I'd guess, even though it's
be so neat & thoroughly bridge the chasm between pc & mobile.

------
bonzini
Why would anybody ever use ACA with either BOT (that doesn't support it) or
UAS?

It's basically a solution in search of a problem, since it is needed when
commands are delivered asynchronously with respect to responses but you don't
have autosense. BOT only has a single command in flight so it didn't need ACA,
but UAS has autosense so it doesn't need it either...

~~~
hlandau
Author here. I'm no expert on the problems ACA was intended to solve, but if I
understand it correctly, I could see some remaining applications for it.

Suppose I schedule 10 commands all at once, with the Ordered task attribute.
If the third command fails, do I necessarily want the remaining commands to be
executed? Possibly these are a logical sequence (e.g. for a tape drive,
rewind, write, etc.)

I have no idea if anything actually exists which can make constructive use of
ACA in this way, but it occurs to me that there is still potentially some use
there even when autosense is enabled.

That is, if I'm understanding ACA correctly.

~~~
bonzini
True, the problem is that no one has ever implemented ACA in the target. :-)
So it does not really matter if the transport supports it.

------
geerlingguy
The article seems slightly pedantic in the argument that Mass Storage is
"SCSI"—it implements a subset of the protocol, so yes, it has some bits of
SCSI, but I don't think it follows to say "USB Mass Storage _is_ SCSI".

~~~
trasz
Every SCSI device implements a subset. The difference is the transport; higher
layers of the SCSI stack, like the part that handles SCSI disks (as opposed to
eg optical drives), don’t really care. They talk SCSI.

As a sidenote, if you configure FreeBSD on Raspberry Pi 0 to serve USB Mass
Storage (like the gadget functionality in Linux), the USB-tunneled SCSI
requests will be handled by the same target that serves Fibre Channel or
iSCSI, with persistent reservations, VAAI and other features that might feel
like a bit of an overkill for a virtual flash drive.

