[2474] in linux-scsi channel archive
Re: SCSI Tape driver
daemon@ATHENA.MIT.EDU (Ricky Beam)
Wed Sep 17 07:36:02 1997
From: Ricky Beam <root@defiant.interpath.net>
To: eowmob@exp-math.uni-essen.de (Michael Weller)
Date: Tue, 16 Sep 1997 19:06:59 -0400 (EDT)
Cc: root@chaos.analogic.com, root@defiant.interpath.net, sameer@securities.com,
linux-scsi@vger.rutgers.edu
In-Reply-To: <Pine.A32.3.95.970916165409.72568C-100000@werner.exp-math.uni-essen.de> from "Michael Weller" at Sep 16, 97 05:22:25 pm
Letting the chips fall where they may, I quote Michael Weller:
>Yes, this is how "Unit attention" works. Next time the device is accessed,
>it returns a "Unit attention" condition. The st driver queries the
>device's state, finds out the "Unit attention" was caused by a Media
>change and clears it's state. This is how Media change detection works
>under linux for removable SCSI-disks (MOs, say).
As I recall, the scsi driver and not st will request the sense data. At
least according to spec, someone has to.
>However, not all device generate "Unit attention" conditions properly.
Properly == as mandated by the SCSI spec. If it does what the spec says
it is supposed to do, then there is no problem. That however, does not
mean ever device follows the standard. (Take, for example, tagged command
queueing on the Quantum Atlas drives... lying bastard drives!)
>Some devices can be configured to report "Unit attention" asynchronously.
>Again, only some device support it, and I found that many SCSI cards don't
>like it too, and I doubt that the linux SCSI adapter drivers will be
>amused when a device contacts them about some asynchronous "Unit
>attention" condition.
Very few scsi cards can handle or even tolerate being in a multi-initiator
environment -- the card has to support "target mode" to do this. And the
driver has to be able to handle being addressed like any other scsi target.
(A properly programmed driver could make your machine look like a SCSI hard
drive.)
> However, problems remain with regards to st as a module
>(will probably always assume an error free tape upon module load) and
>powercycling/unplugging the tape (will not know the error was reset/tape
>changed while device turned off) (however, the (read: some) device might
>be able to signal UNIT ATTENTION always at power up).
Look through the SCSI spec (ftp.symbios.com?) and you will see exactly what
unit attention does. If you changed the media, it alerts you. If the scsi
bus has been reset, it alerts you. If the device has been reset, it alerts
you (maybe the same a bus reset, but there is an indication of a reset.) If
the drive is loading media, it alerts you (not ready to ready transition.)
--Ricky "isn't SCSI wonderful"