Skip to content

Commit

Permalink
Merge pull request #287 from jjakob/xebec_s1410
Browse files Browse the repository at this point in the history
Log Xebec vendor command and decoded data
  • Loading branch information
aperezbios authored Aug 29, 2023
2 parents 39d9566 + ab72f02 commit f430b9e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ZuluSCSI_log_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ static void printNewPhase(int phase, bool initiator = false)
if (!initiator && scsiDev.target->syncOffset > 0)
dbgmsg("---- DATA_OUT, syncOffset ", (int)scsiDev.target->syncOffset,
" syncPeriod ", (int)scsiDev.target->syncPeriod);
// log Xebec vendor commands data
else if (scsiDev.cdb[0] == 0x0C || scsiDev.cdb[0] == 0x0F)
g_LogData = true;
else
dbgmsg("---- DATA_OUT");
break;
Expand Down Expand Up @@ -207,6 +210,17 @@ void scsiLogPhaseChange(int new_phase)
{
dbgmsg("---- Total IN: ", g_InByteCount, " OUT: ", g_OutByteCount, " CHECKSUM: ", (int)g_DataChecksum);
}
// log Xebec vendor command
if (old_phase == DATA_OUT && scsiDev.cdb[0] == 0x0C && g_OutByteCount == 8)
{
int cylinders = ((uint16_t)scsiDev.data[0] << 8) + scsiDev.data[1];
int heads = scsiDev.data[2];
int reducedWrite = ((uint16_t)scsiDev.data[3] << 8) + scsiDev.data[4];
int writePrecomp = ((uint16_t)scsiDev.data[5] << 8) + scsiDev.data[6];
int eccBurst = scsiDev.data[7];
dbgmsg("---- Xebec Initialize Drive Characteristics: cylinders=", cylinders, " heads=", heads,
" reducedWrite=", reducedWrite, " writePrecomp=", writePrecomp, " eccBurst=", eccBurst);
}
g_InByteCount = g_OutByteCount = 0;
g_DataChecksum = 0;

Expand Down

0 comments on commit f430b9e

Please sign in to comment.