diff --git a/src/raspberrypi/controllers/sasidev_ctrl.cpp b/src/raspberrypi/controllers/sasidev_ctrl.cpp index cb445a67..89276f0d 100644 --- a/src/raspberrypi/controllers/sasidev_ctrl.cpp +++ b/src/raspberrypi/controllers/sasidev_ctrl.cpp @@ -356,7 +356,7 @@ void SASIDEV::Execute() ctrl.execstart = SysTimer::GetTimerLow(); // Discard pending sense data from the previous command if the current command is not REQUEST SENSE - if(SASIDEV::eCmdRequestSense != (SASIDEV::sasi_command)ctrl.cmd[0]) { + if ((SASIDEV::sasi_command)ctrl.cmd[0] != SASIDEV::eCmdRequestSense) { ctrl.status = 0; ctrl.device->SetStatusCode(0); } diff --git a/src/raspberrypi/controllers/scsidev_ctrl.cpp b/src/raspberrypi/controllers/scsidev_ctrl.cpp index 59a2e06b..c07d35b6 100644 --- a/src/raspberrypi/controllers/scsidev_ctrl.cpp +++ b/src/raspberrypi/controllers/scsidev_ctrl.cpp @@ -262,7 +262,7 @@ void SCSIDEV::Execute() ctrl.device = ctrl.unit[lun]; - // Discard pending sense data from the previous command + // Discard pending sense data from the previous command if the current command is not REQUEST SENSE if ((SCSIDEV::scsi_command)ctrl.cmd[0] != eCmdRequestSense) { ctrl.device->SetStatusCode(0); } diff --git a/src/raspberrypi/rascsi.cpp b/src/raspberrypi/rascsi.cpp index 4381fccf..29a10757 100644 --- a/src/raspberrypi/rascsi.cpp +++ b/src/raspberrypi/rascsi.cpp @@ -959,6 +959,11 @@ bool ProcessCmd(int fd, const PbDeviceDefinition& pb_device, const PbCommand& co assert(dryRun); break; + case NONE: + // Do nothing, just log + LOGTRACE("Received %s command", PbOperation_Name(operation).c_str()); + break; + default: return ReturnStatus(fd, false, "Unknown operation"); }