Merge pull request #116 from erichelgeson/eric/noopCmds

Add cmds that are ok to respond GOOD and not do anything.
This commit is contained in:
Eric Helgeson 2022-05-30 14:50:33 +00:00 committed by GitHub
commit 79d5b12110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -1698,9 +1698,6 @@ void loop()
case SCSI_START_STOP_UNIT: // TODO: Implement me!
LOGN("[StartStopUnit]");
break;
case SCSI_PREVENT_ALLOW_REMOVAL: // TODO: Implement me!
LOGN("[PreAllowMed.Removal]");
break;
case SCSI_READ_CAPACITY:
LOGN("[ReadCapacity]");
m_sts |= onReadCapacityCommand(cmd[8]);
@ -1710,6 +1707,7 @@ void loop()
m_sts |= onReadCommand(((uint32_t)cmd[2] << 24) | ((uint32_t)cmd[3] << 16) | ((uint32_t)cmd[4] << 8) | cmd[5], ((uint32_t)cmd[7] << 8) | cmd[8]);
break;
case SCSI_WRITE10:
case SCSI_WRITE_AND_VERIFY:
LOGN("[Write10]");
m_sts |= onWriteCommand(((uint32_t)cmd[2] << 24) | ((uint32_t)cmd[3] << 16) | ((uint32_t)cmd[4] << 8) | cmd[5], ((uint32_t)cmd[7] << 8) | cmd[8]);
break;
@ -1742,6 +1740,11 @@ void loop()
case SCSI_SEND_DIAG:
m_sts |= onSendDiagnostic(cmd[1]);
break;
case SCSI_LOCK_UNLOCK_CACHE: // Commands we dont have anything to do but can safely respond GOOD.
case SCSI_PREFETCH: // In the future we could implement something to mimic these.
case SCSI_PREVENT_ALLOW_REMOVAL:
m_sts |= SCSI_STATUS_GOOD;
break;
default:
LOGN("[*Unknown]");
m_sts |= SCSI_STATUS_CHECK_CONDITION;