mirror of
https://github.com/LIV2/amiga-par-to-spi-adapter.git
synced 2025-12-05 22:22:44 +00:00
scsi direct:
* Fixup inquiry size check - we only use 36 bytes * Support Test Unit Ready (needed for HDToolbox in 3.2)
This commit is contained in:
parent
89b1b2bfdd
commit
e57a7f8de8
Binary file not shown.
@ -68,7 +68,7 @@ static uint8_t handle_inquiry(struct SCSICmd *cmd, struct IOStdReq *ior)
|
||||
return TDERR_DiskChanged;
|
||||
}
|
||||
|
||||
if (cmd->scsi_Length < sizeof(struct SCSI_Inquiry)) {
|
||||
if (cmd->scsi_Length < 36) {
|
||||
return IOERR_BADLENGTH;
|
||||
}
|
||||
|
||||
@ -180,6 +180,10 @@ void process_scsi_direct(struct IOStdReq *ior)
|
||||
cmd->scsi_Status = 0;
|
||||
|
||||
switch (cdb[0]) {
|
||||
case SCSI_CMD_TEST_UNIT_READY:
|
||||
cmd->scsi_Actual = 0;
|
||||
ior->io_Error = 0;
|
||||
break;
|
||||
case SCSI_CMD_READ_6:
|
||||
{
|
||||
struct SCSI_CDB_6 *cdb6 = (struct SCSI_CDB_6 *)cdb;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef SCSIDIRECT_H_
|
||||
#define SCSIDIRECT_H_
|
||||
|
||||
#define SCSI_CMD_TEST_UNIT_READY 0x00
|
||||
#define SCSI_CMD_READ_6 0x08
|
||||
#define SCSI_CMD_WRITE_6 0x0A
|
||||
#define SCSI_CMD_READ_10 0x28
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user