mirror of
https://github.com/fhgwright/SCSI2SD.git
synced 2024-06-13 03:29:31 +00:00
Add READ DEFECT DATA command emulation
This commit is contained in:
parent
52828268ae
commit
54ac6377ce
|
@ -522,11 +522,21 @@ int scsiDiskCommand()
|
||||||
else if (unlikely(command == 0x37))
|
else if (unlikely(command == 0x37))
|
||||||
{
|
{
|
||||||
// READ DEFECT DATA
|
// READ DEFECT DATA
|
||||||
scsiDev.status = CHECK_CONDITION;
|
uint32_t allocLength = (((uint16_t)scsiDev.cdb[7]) << 8) |
|
||||||
scsiDev.target->sense.code = NO_SENSE;
|
scsiDev.cdb[8];
|
||||||
scsiDev.target->sense.asc = DEFECT_LIST_NOT_FOUND;
|
|
||||||
scsiDev.phase = STATUS;
|
|
||||||
|
|
||||||
|
scsiDev.data[0] = 0;
|
||||||
|
scsiDev.data[1] = scsiDev.cdb[1]
|
||||||
|
scsiDev.data[2] = 0;
|
||||||
|
scsiDev.data[3] = 0;
|
||||||
|
scsiDev.dataLen = 4;
|
||||||
|
|
||||||
|
if (scsiDev.dataLen > allocLength)
|
||||||
|
{
|
||||||
|
scsiDev.dataLen = allocLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
scsiDev.phase = DATA_IN;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user