Re: [hatari-devel] ACSI: READ/WRITE (10) incorrectly evaluate block number |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] ACSI: READ/WRITE (10) incorrectly evaluate block number
- From: Uwe Seimet <Uwe.Seimet@xxxxxxxxx>
- Date: Sat, 26 Oct 2013 20:18:40 +0200
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1382811521; l=5112; s=domk; d=seimet.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=KWKdU1xc93CF/sVWOvNxW4sv3j8=; b=FOAPBjeHcsFJnBl6qIh+x+nSa7euNyclAAWDhbys71AEhx2jXxb5dYyFMqs524Pw6Cf kqFLVS+mzs6EuWrLFjbjyolFH9vblZFubiMEHFaxBX/0vnC0DmAk23jjwx/Et5zswjGS4 IqKAvbmflmr91UXV4ClAJUUN0XzmrHCmmWE=
Hi Thomas,
> Ok, code now uses fseeko() and I tried to avoid truncation of the
> offset, so if this was part of the problem, it should hopefully be
> fixed now.
I added a new test run based on the current Hatari sources as an
attachment. INQUIRY for ACSI works fine now. Maybe for consistency the IDE
device names returned by Hatari should also start at the actual INQUIRY
device name field (i. e. two blanks after "Hatari", just like it is now
with ACSI).
On first sight these problems remain with ACSI:
1. READ CAPACITY (10) returns a wrong block count. My image has a size of
410009600 bytes, so it should have 800800 blocks of 512 bytes each.
2. READ CAPACTIY (16) is not rejected, but I don't think it is implemented.
3. When I try to read block 201351221 no error is reported, even though
this block cannot exist. (Or maybe I am missing something in my
calculations?)
4. Block 201351222 cannot be read, which is correct, but the error
status codes are wrong. Looks as if CHECK CONDITION is reported but the
actual error status is missing.
5. READ (6) and READ (10) appear to return different contents for block 0,
as already discussed.
6. REPORT LUNS (Opcode 0xa0) is not rejected even though it is not
implemented. Hatari returns some bogus data instead. I guess this has to
do with Hatari not yet dealing with 16 byte CDBs.
The expected outcome for all tests would more or less be the same as
with IDE.
Take care
Uwe
Found SCSI Driver version $0101
Buses:
ID: 0, Name: 'Atari ACSI', Transfer length: 130560 ($1FE00)
ID: 1, Name: 'Atari SCSI', Transfer length: 268435456 ($10000000)
ID: 2, Name: 'Atari IDE', Transfer length: 130560 ($1FE00)
Testing bus 'Atari ACSI (ICD)', device ID 0
CheckDev()
Checking with illegal bus ID
Checking with illegal SCSI ID
Checking with legal bus and SCSI ID
Open/Close()
Available handles: 29
INQUIRY
Calling with legal data
Device name: 'Hatari EmulatedHarddisk', Firmware revision: '0180', Additional length: $1F
Calling with non-existing LUN 7
READ CAPACITY
Reading capacity with READ CAPACITY (10)
Number of blocks: 201351222, Block size: 512
Reading capacity with READ CAPACITY (16)
Reading last block (201351221)
Reading last block + 1 (201351222)
ERROR: Call was not properly rejected
Expected: SenseKey $05 ($00), ASC $21 ($00)
READ
Reading block 0 with READ (6)
Reading block 0 with READ (10)
ERROR: Block contents differ at offset 1
REPORT LUNS
Number of LUNs: 32
List of LUNs: 1919492152, 4017334, 1284636672, 131072000, 887881947, -1670381508, 942669826, 1919492128, 1635018084, 16, 201351222, -2013265920, 0, 671088640, 16779264, 0, 22360, 79084, 3971236, 0, 512, 0, 4017416, 3984660, 3970812, 0, 0, 0, 0, 0, 0, 0
ERROR
Testing bus 'Atari SCSI', device ID 7
CheckDev()
Checking with illegal bus ID
Checking with illegal SCSI ID
Checking with legal bus and SCSI ID
Open/Close()
Available handles: 29
INQUIRY
Calling with legal data
Device name: 'USEIMET HDDRIVER ', Firmware revision: '0900', Additional length: $1F
Calling with non-existing LUN 7
OK
Testing bus 'Atari IDE', device ID 0
CheckDev()
Checking with illegal bus ID
Checking with illegal SCSI ID
Checking with legal bus and SCSI ID
Open/Close()
Available handles: 29
INQUIRY
Calling with legal data
Device name: 'Hatari IDE master disk ', Firmware revision: '1.0 ', Additional length: $1F
Calling with non-existing LUN 7
READ CAPACITY
Reading capacity with READ CAPACITY (10)
Number of blocks: 800352, Block size: 512
Reading capacity with READ CAPACITY (16)
READ CAPACITY (16) is not supported
Reading last block (800351)
Reading last block + 1 (800352)
READ
Reading block 0 with READ (6)
Reading block 0 with READ (10)
Reading block 0 with READ (16)
READ (16) is not supported
Reading block 0 to odd address
Reading block 0 from non-existing LUN 7
REPORT LUNS
Number of LUNs: 1
List of LUNs: 0
OK
Testing bus 'Atari IDE', device ID 1
CheckDev()
Checking with illegal bus ID
Checking with illegal SCSI ID
Checking with legal bus and SCSI ID
Open/Close()
Available handles: 29
INQUIRY
Calling with legal data
Device name: 'Hatari IDE slave disk ', Firmware revision: '1.0 ', Additional length: $1F
Calling with non-existing LUN 7
READ CAPACITY
Reading capacity with READ CAPACITY (10)
Number of blocks: 507024, Block size: 512
Reading capacity with READ CAPACITY (16)
READ CAPACITY (16) is not supported
Reading last block (507023)
Reading last block + 1 (507024)
READ
Reading block 0 with READ (6)
Reading block 0 with READ (10)
Reading block 0 with READ (16)
READ (16) is not supported
Reading block 0 to odd address
Reading block 0 from non-existing LUN 7
REPORT LUNS
Number of LUNs: 1
List of LUNs: 0
OK