Re: [hatari-devel] Wrong MODE SENSE data length for page code 0x3f |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Wrong MODE SENSE data length for page code 0x3f
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sat, 16 Nov 2024 08:13:33 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1731744816; bh=hN7CptGVVtz3ezp+ZwO7WdlO1sAMocB5xCB6LRlSaxU=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=XfZHeUZ9Yza4gAoOnvx6wKeWTbu3YryLee5BFze/q5Km7GSdB0KXOEkvrFp4IWF4u XN4kjNOZBl1XehKG6L3QUrTqbqEiIBx2w3jFP7tl6WLGJTEHlyEXSktmMZnzDii7Nt wU6C6UsiwHjT4qjcbxeQMcrhQoqwC+wQc1/+8tzfasgg9p2NjSV1u1U7tTOR2UG5/f aV93EaHFlZAIdAMkNNRRQ1Xd5VeukgxIbPWBcI3Mz4/3San6GKHQngr1PUscyhafBI DxUqOtGRemekXIXqgrIjFH8gOrX551eJ94uzDz1THnfNFpeecy1fXTl/+3P8F8sqnc V/m2nhbPx0jLQ==
Am Sat, 26 Oct 2024 19:33:18 +0200
schrieb Uwe Seimet <Uwe.Seimet@xxxxxxxxx>:
> Hi Eero and Andreas,
>
> Just let me try to summarize what I would suggest to change in a first step:
>
> 1. If you want to retain SCSI-1 compatibility, which is not the standard most
> Atari software and hardware is using: For REQUEST SENSE nly return 4 bytes
> if the allocation length is *exactly* 0, i.e. do not say "<= 4" but "== 0".
> 2. In any other case return as much sense data as you have, but never more
> than the amount of bytes requested in the allocation length field.
> 3. For any other command there is no special rule for length 0.
>
> If too many bytes are returned the initiator may crash because of a buffer
> overflow, or other strange things may happen.
Ok, thanks, I've changed the code now accordingly. I also added the
possibility to set the SCSI version for each device in the config file, in
case someone wants to experiment with different versions. The default is
still version 1, though, since that's the version that has been used so far.
Thomas