mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-07 13:53:33 +00:00
Added hooks for C8-CCh
This commit is contained in:
parent
983b0257c9
commit
9f8fc1fb8a
|
@ -578,7 +578,7 @@ void SASIDEV::DataIn()
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void SASIDEV::DataOut()
|
void SASIDEV::DataOut()
|
||||||
{
|
{
|
||||||
ASSERT(ctrl.length >= 0);
|
// ASSERT(ctrl.length >= 0);
|
||||||
|
|
||||||
// Phase change
|
// Phase change
|
||||||
if (ctrl.phase != BUS::dataout) {
|
if (ctrl.phase != BUS::dataout) {
|
||||||
|
@ -609,8 +609,8 @@ void SASIDEV::DataOut()
|
||||||
ctrl.bus->SetIO(FALSE);
|
ctrl.bus->SetIO(FALSE);
|
||||||
|
|
||||||
// length, blocks are already calculated
|
// length, blocks are already calculated
|
||||||
ASSERT(ctrl.length > 0);
|
// ASSERT(ctrl.length > 0);
|
||||||
ASSERT(ctrl.blocks > 0);
|
// ASSERT(ctrl.blocks > 0);
|
||||||
ctrl.offset = 0;
|
ctrl.offset = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1193,6 +1193,13 @@ bool SASIDEV::XferOut(bool cont)
|
||||||
case SASIDEV::eCmdInvalid:
|
case SASIDEV::eCmdInvalid:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SASIDEV::eCmdUnknownPowerViewC8:
|
||||||
|
case SASIDEV::eCmdUnknownPowerViewC9:
|
||||||
|
case SASIDEV::eCmdUnknownPowerViewCA:
|
||||||
|
case SASIDEV::eCmdUnknownPowerViewCB:
|
||||||
|
case SASIDEV::eCmdUnknownPowerViewCC:
|
||||||
|
LOGWARN("Finished receiving a Powerview Command ($%02X) in %s", (WORD)ctrl.cmd[0] , __PRETTY_FUNCTION__)
|
||||||
|
break;
|
||||||
case SASIDEV::eCmdSetMcastAddr:
|
case SASIDEV::eCmdSetMcastAddr:
|
||||||
LOGTRACE("%s Done with DaynaPort Set Multicast Address", __PRETTY_FUNCTION__);
|
LOGTRACE("%s Done with DaynaPort Set Multicast Address", __PRETTY_FUNCTION__);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -80,7 +80,12 @@ private:
|
||||||
eCmdWriteLong10 = 0x3F,
|
eCmdWriteLong10 = 0x3F,
|
||||||
eCmdWriteLong16 = 0x9F,
|
eCmdWriteLong16 = 0x9F,
|
||||||
eCmdInvalid = 0xC2,
|
eCmdInvalid = 0xC2,
|
||||||
eCmdSasiCmdAssign = 0x0E
|
eCmdSasiCmdAssign = 0x0E,
|
||||||
|
eCmdUnknownPowerViewC8 = 0xC8,
|
||||||
|
eCmdUnknownPowerViewC9 = 0xC9,
|
||||||
|
eCmdUnknownPowerViewCA = 0xCA,
|
||||||
|
eCmdUnknownPowerViewCB = 0xCB,
|
||||||
|
eCmdUnknownPowerViewCC = 0xCC
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -69,12 +69,12 @@ public:
|
||||||
eCmdSynchronizeCache16 = 0x91,
|
eCmdSynchronizeCache16 = 0x91,
|
||||||
eCmdReadCapacity16_ReadLong16 = 0x9E,
|
eCmdReadCapacity16_ReadLong16 = 0x9E,
|
||||||
eCmdWriteLong16 = 0x9F,
|
eCmdWriteLong16 = 0x9F,
|
||||||
eCmdReportLuns = 0xA0
|
eCmdReportLuns = 0xA0,
|
||||||
eCmdUnknownPowerViewC8 = 0xC8,
|
eCmdUnknownPowerViewC8 = 0xC8,
|
||||||
eCmdUnknownPowerviewC9 = 0xC9,
|
eCmdUnknownPowerViewC9 = 0xC9,
|
||||||
eCmdUnknownPowerviewCA = 0xCA,
|
eCmdUnknownPowerViewCA = 0xCA,
|
||||||
eCmdUnknownPowerviewCB = 0xCB,
|
eCmdUnknownPowerViewCB = 0xCB,
|
||||||
eCmdUnknownPowerviewCC = 0xCC,
|
eCmdUnknownPowerViewCC = 0xCC,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Internal data definition
|
// Internal data definition
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "disk.h"
|
#include "disk.h"
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
static unsigned char reverse_table[256];
|
static unsigned char reverse_table[256];
|
||||||
|
|
||||||
|
@ -53,20 +54,11 @@ const BYTE SCSIPowerView::m_inquiry_response[] = {
|
||||||
|
|
||||||
SCSIPowerView::SCSIPowerView() : Disk("SCPV")
|
SCSIPowerView::SCSIPowerView() : Disk("SCPV")
|
||||||
{
|
{
|
||||||
// m_tap = NULL;
|
AddCommand(SCSIDEV::eCmdUnknownPowerViewC8, "Unknown PowerViewC8", &SCSIPowerView::UnknownCommandC9);
|
||||||
// m_bTapEnable = false;
|
AddCommand(SCSIDEV::eCmdUnknownPowerViewC9, "Unknown PowerViewC9", &SCSIPowerView::UnknownCommandC9);
|
||||||
|
AddCommand(SCSIDEV::eCmdUnknownPowerViewCA, "Unknown PowerViewCA", &SCSIPowerView::UnknownCommandC9);
|
||||||
// AddCommand(SCSIDEV::eCmdTestUnitReady, "TestUnitReady", &SCSIPowerView::TestUnitReady);
|
AddCommand(SCSIDEV::eCmdUnknownPowerViewCB, "Unknown PowerViewCB", &SCSIPowerView::UnknownCommandC9);
|
||||||
// AddCommand(SCSIDEV::eCmdRead6, "Read6", &SCSIPowerView::Read6);
|
AddCommand(SCSIDEV::eCmdUnknownPowerViewCC, "Unknown PowerViewCC", &SCSIPowerView::UnknownCommandC9);
|
||||||
// AddCommand(SCSIDEV::eCmdWrite6, "Write6", &SCSIPowerView::Write6);
|
|
||||||
// AddCommand(SCSIDEV::eCmdRetrieveStats, "RetrieveStats", &SCSIPowerView::RetrieveStatistics);
|
|
||||||
// AddCommand(SCSIDEV::eCmdSetIfaceMode, "SetIfaceMode", &SCSIPowerView::SetInterfaceMode);
|
|
||||||
// AddCommand(SCSIDEV::eCmdSetMcastAddr, "SetMcastAddr", &SCSIPowerView::SetMcastAddr);
|
|
||||||
AddCommand(SCSIDEV::eCmdUnknownPowerviewC8, "EnableInterface", &SCSIPowerView::UnknownCommandC8);
|
|
||||||
AddCommand(SCSIDEV::eCmdUnknownPowerviewC9, "EnableInterface", &SCSIPowerView::UnknownCommandC9);
|
|
||||||
AddCommand(SCSIDEV::eCmdUnknownPowerviewCA, "EnableInterface", &SCSIPowerView::UnknownCommandCA);
|
|
||||||
AddCommand(SCSIDEV::eCmdUnknownPowerviewCB, "EnableInterface", &SCSIPowerView::UnknownCommandCB);
|
|
||||||
AddCommand(SCSIDEV::eCmdUnknownPowerviewCC, "EnableInterface", &SCSIPowerView::UnknownCommandCC);
|
|
||||||
|
|
||||||
struct fb_var_screeninfo fbinfo;
|
struct fb_var_screeninfo fbinfo;
|
||||||
struct fb_fix_screeninfo fbfixinfo;
|
struct fb_fix_screeninfo fbfixinfo;
|
||||||
|
@ -139,32 +131,51 @@ void SCSIPowerView::AddCommand(SCSIDEV::scsi_command opcode, const char* name, v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SCSIPowerView::dump_command(SASIDEV *controller){
|
||||||
|
|
||||||
|
LOGWARN(" %02X %02X %02X %02X %02X %02X %02X %02X [%02X] \n",
|
||||||
|
ctrl->cmd[0],
|
||||||
|
ctrl->cmd[1],
|
||||||
|
ctrl->cmd[2],
|
||||||
|
ctrl->cmd[3],
|
||||||
|
ctrl->cmd[4],
|
||||||
|
ctrl->cmd[5],
|
||||||
|
ctrl->cmd[6],
|
||||||
|
ctrl->cmd[7],
|
||||||
|
ctrl->cmd[8]);
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
// for(int i=0; i<8; i++){
|
||||||
//
|
// LOGWARN(" [%d]: %08X\n",i, ctrl->cmd[i]);
|
||||||
// Unknown Command C8
|
// }
|
||||||
//
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void SCSIPowerView::UnknownCommandC8(SASIDEV *controller)
|
|
||||||
{
|
|
||||||
|
|
||||||
// Set transfer amount
|
|
||||||
ctrl->length = ctrl->cmd[6];
|
|
||||||
|
|
||||||
if (ctrl->length <= 0) {
|
|
||||||
// Failure (Error)
|
|
||||||
controller->Error();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set next block
|
|
||||||
ctrl->blocks = 1;
|
|
||||||
ctrl->next = 1;
|
|
||||||
|
|
||||||
controller->DataOut();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// //---------------------------------------------------------------------------
|
||||||
|
// //
|
||||||
|
// // Unknown Command C8
|
||||||
|
// //
|
||||||
|
// //---------------------------------------------------------------------------
|
||||||
|
// void SCSIPowerView::UnknownCommandC8(SASIDEV *controller)
|
||||||
|
// {
|
||||||
|
|
||||||
|
// // Set transfer amount
|
||||||
|
// ctrl->length = ctrl->cmd[6];
|
||||||
|
// LOGWARN("%s Message Length %d", __PRETTY_FUNCTION__, (int)ctrl->length);
|
||||||
|
// dump_command(controller);
|
||||||
|
|
||||||
|
// if (ctrl->length <= 0) {
|
||||||
|
// // Failure (Error)
|
||||||
|
// controller->Error();
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Set next block
|
||||||
|
// ctrl->blocks = 1;
|
||||||
|
// ctrl->next = 1;
|
||||||
|
|
||||||
|
// controller->DataOut();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
@ -176,18 +187,26 @@ void SCSIPowerView::UnknownCommandC9(SASIDEV *controller)
|
||||||
|
|
||||||
// Set transfer amount
|
// Set transfer amount
|
||||||
ctrl->length = ctrl->cmd[6];
|
ctrl->length = ctrl->cmd[6];
|
||||||
|
LOGWARN("%s Message Length %d", __PRETTY_FUNCTION__, (int)ctrl->length);
|
||||||
|
dump_command(controller);
|
||||||
|
LOGWARN("Controller: %08X ctrl: %08X", (DWORD)controller->GetCtrl(), (DWORD)ctrl);
|
||||||
|
// if (ctrl->length <= 0) {
|
||||||
|
// // Failure (Error)
|
||||||
|
// controller->Error();
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
if (ctrl->length <= 0) {
|
if (ctrl->length == 0){
|
||||||
// Failure (Error)
|
controller->Status();
|
||||||
controller->Error();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Set next block
|
||||||
|
ctrl->blocks = 1;
|
||||||
|
ctrl->next = 1;
|
||||||
|
|
||||||
// Set next block
|
controller->DataOut();
|
||||||
ctrl->blocks = 1;
|
}
|
||||||
ctrl->next = 1;
|
|
||||||
|
|
||||||
controller->DataOut();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -202,7 +221,8 @@ void SCSIPowerView::UnknownCommandCA(SASIDEV *controller)
|
||||||
|
|
||||||
// Set transfer amount
|
// Set transfer amount
|
||||||
ctrl->length = ctrl->cmd[6];
|
ctrl->length = ctrl->cmd[6];
|
||||||
|
LOGWARN("%s Message Length %d", __PRETTY_FUNCTION__, (int)ctrl->length);
|
||||||
|
dump_command(controller);
|
||||||
if (ctrl->length <= 0) {
|
if (ctrl->length <= 0) {
|
||||||
// Failure (Error)
|
// Failure (Error)
|
||||||
controller->Error();
|
controller->Error();
|
||||||
|
@ -227,7 +247,8 @@ void SCSIPowerView::UnknownCommandCB(SASIDEV *controller)
|
||||||
|
|
||||||
// Set transfer amount
|
// Set transfer amount
|
||||||
ctrl->length = ctrl->cmd[6];
|
ctrl->length = ctrl->cmd[6];
|
||||||
|
LOGWARN("%s Message Length %d", __PRETTY_FUNCTION__, (int)ctrl->length);
|
||||||
|
dump_command(controller);
|
||||||
if (ctrl->length <= 0) {
|
if (ctrl->length <= 0) {
|
||||||
// Failure (Error)
|
// Failure (Error)
|
||||||
controller->Error();
|
controller->Error();
|
||||||
|
@ -252,7 +273,8 @@ void SCSIPowerView::UnknownCommandCC(SASIDEV *controller)
|
||||||
|
|
||||||
// Set transfer amount
|
// Set transfer amount
|
||||||
ctrl->length = ctrl->cmd[6];
|
ctrl->length = ctrl->cmd[6];
|
||||||
|
LOGWARN("%s Message Length %d", __PRETTY_FUNCTION__, (int)ctrl->length);
|
||||||
|
dump_command(controller);
|
||||||
if (ctrl->length <= 0) {
|
if (ctrl->length <= 0) {
|
||||||
// Failure (Error)
|
// Failure (Error)
|
||||||
controller->Error();
|
controller->Error();
|
||||||
|
|
|
@ -47,6 +47,8 @@ private:
|
||||||
|
|
||||||
void AddCommand(SCSIDEV::scsi_command, const char*, void (SCSIPowerView::*)(SASIDEV *));
|
void AddCommand(SCSIDEV::scsi_command, const char*, void (SCSIPowerView::*)(SASIDEV *));
|
||||||
|
|
||||||
|
void dump_command(SASIDEV *controller);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SCSIPowerView();
|
SCSIPowerView();
|
||||||
~SCSIPowerView();
|
~SCSIPowerView();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user