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: Uwe Seimet <Uwe.Seimet@xxxxxxxxx>
- Date: Sat, 26 Oct 2024 00:04:33 +0200
- Arc-authentication-results: i=1; strato.com; arc=none; dkim=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1729893886; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=WguYOwFdNZGEzdW9h6LbGXGF0HpyRbQSRq3+Kw/ugMc=; b=CVEpo8OwYY17TEDxpuQk5z81HT/jqVXvjrfmmzrfK5Xl5CUfZoABewz1zElCM62QBS A7yvwST/OJu7g1+WFCqbDzV+98PEZYjMY39JmXUK2pNQYgGDmz3oxhzEywZK7Lsn62nj d8OEhb0GsK2/uY3xh4HCqTxLcA9c4NVtBH1ROTOjVXilD6TPSTCzenORuWCRIoFZeGi3 jRlzxy7toFPrvCvC76KWK/y437GNSkZo0Olf21TeDMsmprA1VDtLl6/8vp7DPONldks2 AZOqjCQs4RSl/WS3NT78s5Hs7eJiQ/+o8BT5b4tzazllPG1DAK9vBr/b7sIYlgfcQUjq Rurg==
- Arc-seal: i=1; a=rsa-sha256; t=1729893886; cv=none; d=strato.com; s=strato-dkim-0002; b=JjkEOnGxuAhfAcT8BQhSJkPJKxlPBO9vCV15BRTS62bysupH75gwxtEbxoZBJwnM1t rBisP5PtnLA1GwBWcJFuqqpRkpdbWHnNKoTLEf/vglNr31Dli7zJFWgEzCSNy5DF8T0x ftLRvNhLbg5Q9BXcRRIz0NYyQJ5MP/rMWMvE7rQW5+ervg5k21SLrDVkvV3uNnVbT5LQ 2aDl81k6u7yufl1RA3WHHzR+6Wos+w7jtyjreu0nUG/wyPwyPD6eVKfqa7hZZ8GecmrN /CxL+2V47MIVtVzHJE0S19HWW0vvf+yGmETBRkRuc598mGGVxJkp7u5vNfl3ORkWIlvV /LfQ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1729893886; s=strato-dkim-0002; d=seimet.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=WguYOwFdNZGEzdW9h6LbGXGF0HpyRbQSRq3+Kw/ugMc=; b=dPct6oHjjN9yGySiQTsDogBaT4W0YCyVCqg0l3soh1UJYtX8Cnqy+Vl4HXTzOTucZO Asiv9BLptX4OrqTqC2QBuZnPi4e/Ds8prOHb0ldyXxynCnnN3XgLtlNqcdH4Dx53w+BC gnunO+ybRgOJCRvcWBdTKP7/hrf0Ls4D5bHsvk1ApBOYHjOwPbMhXdaEV+t/f4gqD38q 9p3GdUiKiVrlRECJTr8J3dmsofdYLBMi2SIlqCstmb+UU9cPRJyY14BN+cs5qlGwkaRD 3jlqvWYFREvHALiM9brntO99QWvJEaOBu2UOPTPKiC8I+03GC93H7kkk5VzK8oko/MBw 4Q1A==
- Dkim-signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1729893886; s=strato-dkim-0003; d=seimet.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=WguYOwFdNZGEzdW9h6LbGXGF0HpyRbQSRq3+Kw/ugMc=; b=1OxCu8hzqXJa+o+q4k9Ap8z/1d6++SwGbZEG8S2FzuJGB6QclwCTyTkKpIu3fQJ7Sb isv+IpXMpOxOMmVmALCQ==
Hi,
I would like to get back to the Linux log and hdc.c. Code like
/* Limit to sane length */
if (nRetLen <= 0)
{
nRetLen = 4;
}
or
if (nRetLen <= 4)
{
will definitely cause issues with an OS that expects SCSI, especially
SCSI-2, drives. Sending a different number of bytes than the initiator
requested can easily cause issues. If 0 bytes are requested, for instance,
this means 0 bytes have to be transferred, not 4 bytes.
It looks to me as if this code tries to simulate the behavior of old drives
like SH/Megafile or SASI drives, but for Linux this will probably not work.
The bus reset you can see in the log is very likely caused by a mismatch of
the number of bytes expected/requested and the number actually returned by
Hatari.
I guess that (at least for a test) removing this code and returning the
proper number of bytes will resolve some of the Linux issues with SCSI
drives.
Best regards
Uwe