mirror of
https://github.com/erichelgeson/BlueSCSI.git
synced 2024-10-31 18:04:27 +00:00
Implement Test Unit Ready command
This commit is contained in:
parent
f7799fb225
commit
408e155a63
@ -1352,6 +1352,20 @@ byte onModeSelectCommand(byte scsi_cmd, byte flags, uint32_t len)
|
|||||||
return SCSI_STATUS_GOOD;
|
return SCSI_STATUS_GOOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Test Unit Ready command processing.
|
||||||
|
*/
|
||||||
|
byte onTestUnitReady()
|
||||||
|
{
|
||||||
|
// Check that image file is present
|
||||||
|
if(!m_img) {
|
||||||
|
m_senseKey = SCSI_SENSE_NOT_READY;
|
||||||
|
m_addition_sense = SCSI_ASC_MEDIUM_NOT_PRESENT;
|
||||||
|
return SCSI_STATUS_CHECK_CONDITION;
|
||||||
|
}
|
||||||
|
return SCSI_STATUS_GOOD;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MsgIn2.
|
* MsgIn2.
|
||||||
*/
|
*/
|
||||||
@ -1516,6 +1530,7 @@ void loop()
|
|||||||
switch(cmd[0]) {
|
switch(cmd[0]) {
|
||||||
case SCSI_TEST_UNIT_READY: // TODO: Implement me!
|
case SCSI_TEST_UNIT_READY: // TODO: Implement me!
|
||||||
LOGN("[Test Unit Ready]");
|
LOGN("[Test Unit Ready]");
|
||||||
|
m_sts |= onTestUnitReady();
|
||||||
break;
|
break;
|
||||||
case SCSI_REZERO_UNIT: // TODO: Implement me!
|
case SCSI_REZERO_UNIT: // TODO: Implement me!
|
||||||
LOGN("[Rezero Unit]");
|
LOGN("[Rezero Unit]");
|
||||||
|
@ -27,5 +27,6 @@
|
|||||||
#define SCSI_ASC_WRITE_PROTECTED 0x2700
|
#define SCSI_ASC_WRITE_PROTECTED 0x2700
|
||||||
#define SCSI_ASC_CANNOT_READ_MEDIUM_UNKNOWN_FORMAT 0x3001
|
#define SCSI_ASC_CANNOT_READ_MEDIUM_UNKNOWN_FORMAT 0x3001
|
||||||
#define SCSI_ASC_CANNOT_READ_MEDIUM_INCOMPATIBLE_FORMAT 0x3002
|
#define SCSI_ASC_CANNOT_READ_MEDIUM_INCOMPATIBLE_FORMAT 0x3002
|
||||||
|
#define SCSI_ASC_MEDIUM_NOT_PRESENT 0x3A00
|
||||||
#define SCSI_ASC_LUN_NOT_READY_MANUAL_INTERVENTION_REQUIRED 0x0403
|
#define SCSI_ASC_LUN_NOT_READY_MANUAL_INTERVENTION_REQUIRED 0x0403
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user