Re: SCSI woes (followup)

Luben Tuikov
2002-09-24T18:16:11Z

James Bottomley wrote:
>
> A better fix is probably to implement a flag to say whether the door should be
> locked or not.
>

This would really depend on the command to be executed.
I.e. does the command need access to the media, or not.

> The whole lock door before a command goes down philosophy looks slightly wrong
> to me. I can see we want to lock the door for a mounted device and other
> conditions, but locking the door just to send down a test unit ready or
> inquiry doesn't seem correct.

Well, SAM-3 is the place to check this out. For TUR (7.27) it would seem that
one does indeed need to lock the door/media into place in order to
be ``able to accept an appropriate medium-access command without returning
CHECK CONDITION status''.

> Door locking is very similar to reservation maintenance. Perhaps adding
> kernel code to maintain certain persistent but fragile states of the device
> might be in order.

This is the job of the task manager for the LU, and if not implemented
by the LU, it should be implemented by the LLDD, which would complicate
things considerably for the LLDD.

As to your suggestion, there may be generic code, which LLDD may want to use,
but nevetheless, has to be no higher than the LLDD, and ideally in the LU itself.

The idea is that SCSI core should be quite minimal as I've been suggesting
for some time now.

--
Luben