Re: [hatari-devel] MODE SENSE patch

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


Uwe Seimet schrieb:

The attached patch improves MODE SENSE a bit, by at least returning one
page instead of none when all are requested.

Even with this patch, I'm confused by the MODE SENSE return data. Maybe
Uwe (or someone else) can help resolve my confusion.

I would expect the MODE SENSE data *always* to start with a four-byte
header, containing: the overall data length, the medium type, a write
protect bit and the length of the block descriptors (if any). Only after
this header the individual pages should be returned.

This is indeed the case when requesting page 0x3F (=all pages); see
screenshots grab0005 and grab0006. At least the overall length appears
to be set in the header (by [1]) and page 4 data starts only after the
header at offset 4, followed by page 0 data.

However, when I request only page 4 (screenshots grab0003 and grab0004)
the four-byte header is missing and the page 4 data starts of offset 0.
This matches what I see in the Hatari codebase: [2].

Is my understanding of the SCSI standard(s) so wrong, w.r.t. MODE SENSE?
Actual SCSI devices that I checked *always* return that header.

Regards
Christian

[1]
https://git.tuxfamily.org/hatari/hatari.git/tree/src/hdc.c?id=c895a8b5f0f5637bc0ed8e7f17633823558953bd#n411
[2]
https://git.tuxfamily.org/hatari/hatari.git/tree/src/hdc.c?id=c895a8b5f0f5637bc0ed8e7f17633823558953bd#n399
--
Christian Zietz  -  CHZ-Soft  -  czietz@xxxxxxx
WWW: https://www.chzsoft.de/
PGP/GnuPG-Key-ID: 0x52CB97F66DA025CA / 0x6DA025CA

Attachment: grab0005.png
Description: PNG image

Attachment: grab0006.png
Description: PNG image

Attachment: grab0003.png
Description: PNG image

Attachment: grab0004.png
Description: PNG image



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