scsicdrom: Include invalid field info.

For CHECK_CONDITION status from READ_CAPACITY_10 and READ_TOC.
This commit is contained in:
joevt 2024-03-10 03:59:38 -07:00 committed by dingusdev
parent a6fda3b787
commit e872f08273

View File

@ -331,6 +331,10 @@ void ScsiCdrom::read_toc()
start_track); start_track);
this->status = ScsiStatus::CHECK_CONDITION; this->status = ScsiStatus::CHECK_CONDITION;
this->sense = ScsiSense::ILLEGAL_REQ; 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 = 6; // offset of start_track
this->switch_phase(ScsiPhase::STATUS); this->switch_phase(ScsiPhase::STATUS);
return; return;
} }
@ -388,6 +392,10 @@ void ScsiCdrom::read_capacity_10()
LOG_F(ERROR, "%s: non-zero LBA for PMI=0", this->name.c_str()); LOG_F(ERROR, "%s: non-zero LBA for PMI=0", this->name.c_str());
this->status = ScsiStatus::CHECK_CONDITION; this->status = ScsiStatus::CHECK_CONDITION;
this->sense = ScsiSense::ILLEGAL_REQ; 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); this->switch_phase(ScsiPhase::STATUS);
return; return;
} }