mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-21 23:29:39 +00:00
Fix logging for Data Out phase, fixed offset (#907)
Fixed issues found while testing for release 22.10
This commit is contained in:
parent
d6153e9647
commit
dede2a6f35
@ -776,6 +776,16 @@ void ScsiController::DataOutNonBlockOriented()
|
|||||||
assert(IsDataOut());
|
assert(IsDataOut());
|
||||||
|
|
||||||
switch (GetOpcode()) {
|
switch (GetOpcode()) {
|
||||||
|
// TODO Check why these cases are needed
|
||||||
|
case scsi_command::eCmdWrite6:
|
||||||
|
case scsi_command::eCmdWrite10:
|
||||||
|
case scsi_command::eCmdWrite16:
|
||||||
|
case scsi_command::eCmdWriteLong10:
|
||||||
|
case scsi_command::eCmdWriteLong16:
|
||||||
|
case scsi_command::eCmdVerify10:
|
||||||
|
case scsi_command::eCmdVerify16:
|
||||||
|
break;
|
||||||
|
|
||||||
case scsi_command::eCmdModeSelect6:
|
case scsi_command::eCmdModeSelect6:
|
||||||
case scsi_command::eCmdModeSelect10: {
|
case scsi_command::eCmdModeSelect10: {
|
||||||
// TODO Try to get rid of this cast
|
// TODO Try to get rid of this cast
|
||||||
|
@ -36,6 +36,9 @@ HostServices::HostServices(int lun, const ControllerManager& manager)
|
|||||||
{
|
{
|
||||||
dispatcher.Add(scsi_command::eCmdTestUnitReady, "TestUnitReady", &HostServices::TestUnitReady);
|
dispatcher.Add(scsi_command::eCmdTestUnitReady, "TestUnitReady", &HostServices::TestUnitReady);
|
||||||
dispatcher.Add(scsi_command::eCmdStartStop, "StartStopUnit", &HostServices::StartStopUnit);
|
dispatcher.Add(scsi_command::eCmdStartStop, "StartStopUnit", &HostServices::StartStopUnit);
|
||||||
|
|
||||||
|
SetReady(true);
|
||||||
|
SetReset(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HostServices::Dispatch(scsi_command cmd)
|
bool HostServices::Dispatch(scsi_command cmd)
|
||||||
|
@ -358,7 +358,7 @@ void SCSIDaynaPort::Write6()
|
|||||||
ctrl->length = GetInt16(ctrl->cmd, 3);
|
ctrl->length = GetInt16(ctrl->cmd, 3);
|
||||||
}
|
}
|
||||||
else if (data_format == 0x80) {
|
else if (data_format == 0x80) {
|
||||||
ctrl->length = GetInt16(ctrl->cmd, 3 + 8);
|
ctrl->length = GetInt16(ctrl->cmd, 3) + 8;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOGWARN("%s Unknown data format $%02X", __PRETTY_FUNCTION__, data_format)
|
LOGWARN("%s Unknown data format $%02X", __PRETTY_FUNCTION__, data_format)
|
||||||
@ -366,7 +366,7 @@ void SCSIDaynaPort::Write6()
|
|||||||
LOGTRACE("%s length: $%04X (%d) format: $%02X", __PRETTY_FUNCTION__, ctrl->length, ctrl->length, data_format)
|
LOGTRACE("%s length: $%04X (%d) format: $%02X", __PRETTY_FUNCTION__, ctrl->length, ctrl->length, data_format)
|
||||||
|
|
||||||
if (ctrl->length <= 0) {
|
if (ctrl->length <= 0) {
|
||||||
throw scsi_exception();
|
throw scsi_exception(sense_key::ILLEGAL_REQUEST, asc::INVALID_FIELD_IN_CDB);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set next block
|
// Set next block
|
||||||
|
@ -60,6 +60,9 @@ SCSIPrinter::SCSIPrinter(int lun) : PrimaryDevice("SCLP", lun)
|
|||||||
dispatcher.Add(scsi_command::eCmdSynchronizeBuffer, "SynchronizeBuffer", &SCSIPrinter::SynchronizeBuffer);
|
dispatcher.Add(scsi_command::eCmdSynchronizeBuffer, "SynchronizeBuffer", &SCSIPrinter::SynchronizeBuffer);
|
||||||
dispatcher.Add(scsi_command::eCmdSendDiag, "SendDiagnostic", &SCSIPrinter::SendDiagnostic);
|
dispatcher.Add(scsi_command::eCmdSendDiag, "SendDiagnostic", &SCSIPrinter::SendDiagnostic);
|
||||||
dispatcher.Add(scsi_command::eCmdStartStop, "StopPrint", &SCSIPrinter::StopPrint);
|
dispatcher.Add(scsi_command::eCmdStartStop, "StopPrint", &SCSIPrinter::StopPrint);
|
||||||
|
|
||||||
|
SetReady(true);
|
||||||
|
SetReset(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
SCSIPrinter::~SCSIPrinter()
|
SCSIPrinter::~SCSIPrinter()
|
||||||
|
Loading…
Reference in New Issue
Block a user