The SCSI phase is now set to status at the beginning of cdrom_command() and scsi_hd_command() as well as in scsi_device_target_command(), in order to prevent the SCSI bus being perpetually stuck in command phase in case of error; fixes the DOS Trantor SCSI CD-ROM driver.

This commit is contained in:
OBattler
2017-10-09 02:35:12 +02:00
parent 02bbfb26eb
commit 65dca51e23
3 changed files with 5 additions and 0 deletions

View File

@@ -2366,6 +2366,8 @@ void cdrom_command(uint8_t id, uint8_t *cdb)
msf = cdb[1] & 2;
cdrom[id].sector_len = 0;
SCSIPhase = SCSI_PHASE_STATUS;
/* This handles the Not Ready/Unit Attention check if it has to be handled at this point. */
if (cdrom_pre_execution_check(id, cdb) == 0)
{

View File

@@ -46,6 +46,7 @@ static void scsi_device_target_command(int lun_type, uint8_t id, uint8_t *cdb)
}
else
{
SCSIPhase = SCSI_PHASE_STATUS;
SCSIStatus = SCSI_STATUS_CHECK_CONDITION;
}
}

View File

@@ -1441,6 +1441,8 @@ void scsi_hd_command(uint8_t id, uint8_t *cdb)
shdc[id].sector_len = 0;
SCSIPhase = SCSI_PHASE_STATUS;
/* This handles the Not Ready/Unit Attention check if it has to be handled at this point. */
if (scsi_hd_pre_execution_check(id, cdb) == 0)
{