mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-22 15:29:58 +00:00
scsidevice: Remember SELECT_WITH_ATN message.
It might be an IDENTIFY message which contains a LUN number.
This commit is contained in:
parent
ff9b8a59e2
commit
091cf4337c
@ -73,6 +73,12 @@ namespace ScsiStatus {
|
|||||||
namespace ScsiMessage {
|
namespace ScsiMessage {
|
||||||
enum : uint8_t {
|
enum : uint8_t {
|
||||||
COMMAND_COMPLETE = 0,
|
COMMAND_COMPLETE = 0,
|
||||||
|
|
||||||
|
TARGET_ROUTINE_NUMBER_MASK = 0x07,
|
||||||
|
LOGICAL_UNIT_NUMBER_MASK = 0x07,
|
||||||
|
IS_TARGET_ROUTINE_NuMBER = 0x20,
|
||||||
|
HAS_DISCONNECT_PRIVILEDGE = 0x40,
|
||||||
|
IDENTIFY = 0x80,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -210,6 +216,8 @@ protected:
|
|||||||
int sksv;
|
int sksv;
|
||||||
int field;
|
int field;
|
||||||
|
|
||||||
|
bool last_selection_has_atention = false;
|
||||||
|
uint8_t last_selection_message = 0;
|
||||||
ScsiBus* bus_obj;
|
ScsiBus* bus_obj;
|
||||||
|
|
||||||
action_callback pre_xfer_action = nullptr;
|
action_callback pre_xfer_action = nullptr;
|
||||||
|
@ -48,7 +48,11 @@ void ScsiDevice::notify(ScsiMsg msg_type, int param)
|
|||||||
this->initiator_id = this->bus_obj->get_initiator_id();
|
this->initiator_id = this->bus_obj->get_initiator_id();
|
||||||
if (this->bus_obj->test_ctrl_lines(SCSI_CTRL_ATN)) {
|
if (this->bus_obj->test_ctrl_lines(SCSI_CTRL_ATN)) {
|
||||||
this->switch_phase(ScsiPhase::MESSAGE_OUT);
|
this->switch_phase(ScsiPhase::MESSAGE_OUT);
|
||||||
|
this->last_selection_has_atention = true;
|
||||||
|
this->last_selection_message = this->msg_buf[0];
|
||||||
|
LOG_F(SCSIDEVICE, "%s: received message:0x%02x", this->get_name().c_str(), this->msg_buf[0]);
|
||||||
} else {
|
} else {
|
||||||
|
this->last_selection_has_atention = false;
|
||||||
this->switch_phase(ScsiPhase::COMMAND);
|
this->switch_phase(ScsiPhase::COMMAND);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user