mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-27 00:29:18 +00:00
scsihd: Setup data_ptr for STATUS and MESSAGE_IN.
bytes_out is used instead of the removed cur_buf_cnt. data_ptr is setup by prepare_data instead of process_command. Not sure why scsicdrom doesn't set bytes_out in prepare_data.
This commit is contained in:
parent
f1abb66f9a
commit
a48851888f
@ -179,11 +179,15 @@ bool ScsiHardDisk::prepare_data() {
|
||||
} else {
|
||||
this->data_buf[0] = ScsiStatus::CHECK_CONDITION;
|
||||
}
|
||||
this->data_size = 1;
|
||||
this->bytes_out = 1;
|
||||
this->data_ptr = (uint8_t*)this->data_buf;
|
||||
this->data_size = this->bytes_out;
|
||||
break;
|
||||
case ScsiPhase::MESSAGE_IN:
|
||||
this->data_buf[0] = this->msg_code;
|
||||
this->data_size = 1;
|
||||
this->bytes_out = 1;
|
||||
this->data_ptr = (uint8_t*)this->data_buf;
|
||||
this->data_size = this->bytes_out;
|
||||
break;
|
||||
default:
|
||||
LOG_F(WARNING, "%s: unexpected phase in prepare_data", this->name.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user