From 92dea0e40448f66f6920370d79779388800b99cb Mon Sep 17 00:00:00 2001 From: joevt Date: Sun, 10 Mar 2024 04:18:17 -0700 Subject: [PATCH] scsihd: Include invalid field info. For CHECK_CONDITION status from READ_CAPACITY_10. --- devices/common/scsi/scsihd.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/devices/common/scsi/scsihd.cpp b/devices/common/scsi/scsihd.cpp index 9eae012..f391580 100644 --- a/devices/common/scsi/scsihd.cpp +++ b/devices/common/scsi/scsihd.cpp @@ -447,6 +447,10 @@ void ScsiHardDisk::read_capacity_10() { LOG_F(ERROR, "%s: non-zero LBA for PMI=0", this->name.c_str()); this->status = ScsiStatus::CHECK_CONDITION; this->sense = ScsiSense::ILLEGAL_REQ; + this->asc = 0x24; // Invalid Field in CDB + this->ascq = 0; + this->sksv = 0xc0; // sksv=1, C/D=Command, BPV=0, BP=0 + this->field = 8; this->switch_phase(ScsiPhase::STATUS); return; }