mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-27 01:31:21 +00:00
scsicdrom: Move mode_select_6.
Make it a separate method like scsihd. It also checks the incoming param size. If it's zero then the phase is not switched. Is that wrong? Still probably unfinished.
This commit is contained in:
parent
e17a96f5ec
commit
a79f07e4dc
@ -84,8 +84,7 @@ void ScsiCdrom::process_command()
|
||||
this->illegal_command(cmd);
|
||||
break;
|
||||
case ScsiCommand::MODE_SELECT_6:
|
||||
this->incoming_size = cmd[4];
|
||||
this->switch_phase(ScsiPhase::DATA_OUT);
|
||||
this->mode_select_6(cmd[4]);
|
||||
break;
|
||||
case ScsiCommand::RELEASE_UNIT:
|
||||
this->illegal_command(cmd);
|
||||
@ -281,6 +280,19 @@ void ScsiCdrom::mode_sense_6()
|
||||
this->switch_phase(ScsiPhase::DATA_IN);
|
||||
}
|
||||
|
||||
int ScsiCdrom::mode_select_6(uint8_t param_len)
|
||||
{
|
||||
if (param_len == 0) {
|
||||
return 0x0;
|
||||
}
|
||||
else {
|
||||
LOG_F(ERROR, "Mode Select calling for param length of: %d", param_len);
|
||||
this->incoming_size = param_len;
|
||||
this->switch_phase(ScsiPhase::DATA_OUT);
|
||||
return param_len;
|
||||
}
|
||||
}
|
||||
|
||||
void ScsiCdrom::read_toc()
|
||||
{
|
||||
int tot_tracks;
|
||||
|
@ -45,6 +45,8 @@ protected:
|
||||
int test_unit_ready();
|
||||
void read(uint32_t lba, uint16_t nblocks, uint8_t cmd_len);
|
||||
void inquiry();
|
||||
int mode_select_6(uint8_t param_len);
|
||||
|
||||
void mode_sense_6();
|
||||
void read_toc();
|
||||
void read_capacity_10();
|
||||
|
Loading…
x
Reference in New Issue
Block a user