mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-22 16:33:17 +00:00
Fix issue 750 (Daynaport problems in develop branch) (#754)
INQUIRY for the Daynaport can return up to 37 bytes. The additional length field for the Daynaport is now 0x20 instead of 0x1b.
This commit is contained in:
parent
a684aa65ad
commit
a3a53354cc
@ -60,6 +60,13 @@ SCSIDaynaPort::~SCSIDaynaPort()
|
||||
|
||||
bool SCSIDaynaPort::Dispatch(SCSIDEV *controller)
|
||||
{
|
||||
// TODO As long as DaynaPort suffers from being a subclass of Disk at least reject MODE SENSE and MODE SELECT
|
||||
SASIDEV::ctrl_t *ctrl = controller->GetCtrl();
|
||||
if (ctrl->cmd[0] == eCmdModeSense6 || ctrl->cmd[0] == eCmdModeSelect6 ||
|
||||
ctrl->cmd[0] == eCmdModeSense10 || ctrl->cmd[0] == eCmdModeSelect10) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The superclass class handles the less specific commands
|
||||
return dispatcher.Dispatch(this, controller) ? true : super::Dispatch(controller);
|
||||
}
|
||||
@ -69,7 +76,6 @@ bool SCSIDaynaPort::Init(const unordered_map<string, string>& params)
|
||||
SetParams(params);
|
||||
|
||||
#ifdef __linux__
|
||||
// TAP Driver Generation
|
||||
m_tap = new CTapDriver();
|
||||
m_bTapEnable = m_tap->Init(GetParams());
|
||||
if(!m_bTapEnable){
|
||||
@ -114,7 +120,14 @@ void SCSIDaynaPort::Open(const Filepath& path)
|
||||
|
||||
vector<BYTE> SCSIDaynaPort::Inquiry() const
|
||||
{
|
||||
return PrimaryDevice::Inquiry(device_type::PROCESSOR, scsi_level::SCSI_2, false);
|
||||
vector<BYTE> buf = PrimaryDevice::Inquiry(device_type::PROCESSOR, scsi_level::SCSI_2, false);
|
||||
|
||||
// The Daynaport driver for the Mac expects 37 bytes: Increase additional length and
|
||||
// add a vendor-specific byte in order to satisfy this driver.
|
||||
buf[4]++;
|
||||
buf.push_back(0);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// The following should be updated for each release
|
||||
const int rascsi_major_version = 22; // Last two digits of year
|
||||
const int rascsi_minor_version = 03; // Month
|
||||
const int rascsi_minor_version = 04; // Month
|
||||
const int rascsi_patch_version = -1; // Patch number - increment for each update
|
||||
|
||||
static char rascsi_version_string[30]; // Allow for string up to "XX.XX.XXX" + null character + "development build"
|
||||
|
Loading…
Reference in New Issue
Block a user