Re: [hatari-devel] Wrong MODE SENSE data length for page code 0x3f

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]




Am 26.10.2024 um 17:48 schrieb Uwe Seimet <Uwe.Seimet@xxxxxxxxx>:

Does Linux only support SCSI-2 and later drives?

I think SCSI-1-CCS works the same regarding the allocation length as SCSI-2
(or newer).

I just check the specs, SCSI-1-CCS still says that an allocation length of 0
(for REQUEST SENSE, not for other commands) returns 4 bytes. So this seems
to have changed with SCSI-2. The standard says:

Targets shall be capable of returning eighteen bytes of data in response
to a REQUEST SENSE command.  If the allocation length is eighteen or
greater, and a target returns less than eighteen bytes of data, the
initiator should assume that the bytes not transferred would have been
zeros had the target returned those bytes.  Initiators can determine how
much sense data has been returned by examining the allocation length
parameter in the command descriptor block and the additional sense length
in the sense data.  Targets shall not adjust the additional sense length
to reflect truncation if the allocation length is less than the sense data
available.

Best regards

Uwe


While debugging SCSI it might help to have a look at my implementation (still SCSI-I, but differences should not be too large):

https://sourceforge.net/p/previous/code/HEAD/tree/trunk/src/scsi.c

This has been thoroughly tested and works with all versions of NeXTstep and also with modern NetBSD. There is no Linux for NeXT, so I can’t test that one. From my experiences: Bus phases are especially tricky!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/