diff --git a/cpp/controllers/scsi_controller.cpp b/cpp/controllers/scsi_controller.cpp index e6acca41..9d90d267 100644 --- a/cpp/controllers/scsi_controller.cpp +++ b/cpp/controllers/scsi_controller.cpp @@ -813,9 +813,6 @@ bool ScsiController::XferOutBlockOriented(bool cont) case scsi_command::eCmdWrite6: case scsi_command::eCmdWrite10: case scsi_command::eCmdWrite16: - // TODO Verify has to verify, not to write, see https://github.com/PiSCSI/piscsi/issues/807 - case scsi_command::eCmdVerify10: - case scsi_command::eCmdVerify16: { // TODO Get rid of this special case for SCBR if (auto bridge = dynamic_pointer_cast(device); bridge) { @@ -853,12 +850,29 @@ bool ScsiController::XferOutBlockOriented(bool cont) // If you do not need the next block, end here IncrementNext(); - if (!cont) { - break; + if (cont) { + SetLength(disk->GetSectorSizeInBytes()); + ResetOffset(); + } + + break; + } + + case scsi_command::eCmdVerify10: + case scsi_command::eCmdVerify16: + { + auto disk = dynamic_pointer_cast(device); + if (disk == nullptr) { + return false; + } + + // If you do not need the next block, end here + IncrementNext(); + if (cont) { + SetLength(disk->GetSectorSizeInBytes()); + ResetOffset(); } - SetLength(disk->GetSectorSizeInBytes()); - ResetOffset(); break; }