scsihd: Include invalid field info.

For CHECK_CONDITION status from READ_CAPACITY_10.
This commit is contained in:
joevt 2024-03-10 04:18:17 -07:00 committed by dingusdev
parent bfd3077bd0
commit 92dea0e404
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}