mirror of
https://github.com/dkgrizzly/GreenSCSI.git
synced 2024-11-27 22:52:18 +00:00
Send Diagnostic, Prefetch and Sync Cache stubs
This commit is contained in:
parent
7d1227a193
commit
3429bab34b
@ -184,6 +184,9 @@ void ConfigureDiskHandlers(VirtualDevice_t *vdev) {
|
||||
vdev->m_handler[CMD_MODE_SENSE10] = &ModeSenseCommandHandler;
|
||||
vdev->m_handler[CMD_SEARCH_DATA_EQUAL] = &SearchDataEqualCommandHandler;
|
||||
vdev->m_handler[CMD_READ_DEFECT_DATA] = &ReadDefectCommandHandler;
|
||||
vdev->m_handler[CMD_SEND_DIAGNOSTIC] = &SendDiagnosticCommandHandler;
|
||||
vdev->m_handler[CMD_PREFETCH_CACHE10] = &PrefetchCommandHandler;
|
||||
vdev->m_handler[CMD_SYNCHRONIZE_CACHE10] = &SyncCacheCommandHandler;
|
||||
#if SUPPORT_SASI
|
||||
if(vdev->m_quirks & QUIRKS_SASI)
|
||||
vdev->m_handler[CMD_SET_DRIVE_PARAMETER] = &DTCsetDriveParameterCommandHandler;
|
||||
|
@ -530,6 +530,24 @@ void SearchDataEqualCommandHandler() {
|
||||
m_phase = PHASE_STATUSIN;
|
||||
}
|
||||
|
||||
void SendDiagnosticCommandHandler() {
|
||||
LOGN("[SendDiagnostic]");
|
||||
if(!m_sel) {
|
||||
m_sts |= STATUS_CHECK; // Image file absent
|
||||
m_phase = PHASE_STATUSIN;
|
||||
return;
|
||||
}
|
||||
if(m_cmd[1] & 0x04) {
|
||||
} else {
|
||||
m_sel->m_sense.m_code = INVALID_FIELD_IN_CDB; /* "Invalid field in CDB" */
|
||||
m_sel->m_sense.m_key_specific[0] = ERROR_IN_OPCODE; /* "Error in Byte 1" */
|
||||
m_sel->m_sense.m_key_specific[1] = 0x00;
|
||||
m_sel->m_sense.m_key_specific[2] = 0x01;
|
||||
m_sts |= STATUS_CHECK;
|
||||
}
|
||||
m_phase = PHASE_STATUSIN;
|
||||
}
|
||||
|
||||
void ReadDefectCommandHandler() {
|
||||
LOGN("[ReadDefect]");
|
||||
m_responsebuffer[0] = 0x00;
|
||||
@ -551,6 +569,16 @@ void PreAllowMediumRemovalCommandHandler() {
|
||||
m_phase = PHASE_STATUSIN;
|
||||
}
|
||||
|
||||
void PrefetchCommandHandler() {
|
||||
LOGN("[Prefetch]");
|
||||
m_phase = PHASE_STATUSIN;
|
||||
}
|
||||
|
||||
void SyncCacheCommandHandler() {
|
||||
LOGN("[SyncCache]");
|
||||
m_phase = PHASE_STATUSIN;
|
||||
}
|
||||
|
||||
void UnknownCommandHandler() {
|
||||
LOGN("[*Unknown]");
|
||||
m_sts |= STATUS_CHECK;
|
||||
|
@ -531,6 +531,7 @@ void ConfigureOpticalHandlers(VirtualDevice_t *vdev) {
|
||||
vdev->m_handler[CMD_READ_TOC] = &OpticalReadTOCCommandHandler;
|
||||
vdev->m_handler[CMD_READ_HEADER] = &OpticalHeaderCommandHandler;
|
||||
//vdev->m_handler[CMD_GET_CONFIGURATION] = &OpticalGetConfigurationCommandHandler;
|
||||
vdev->m_handler[CMD_SEND_DIAGNOSTIC] = &SendDiagnosticCommandHandler;
|
||||
vdev->m_handler[CMD_GET_EVENT_STATUS_NOTIFICATION] = &OpticalEventStatusCommandHandler;
|
||||
vdev->m_handler[CMD_READ_DISC_INFORMATION] = &OpticalReadDiscInfoCommandHandler;
|
||||
vdev->m_handler[CMD_MODE_SELECT10] = &ModeSelect10CommandHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user