Added SCSI_COMPLIANT_HANDSHAKE switch

This commit is contained in:
Uwe Seimet 2023-11-20 09:36:41 +01:00
parent 08e0f447b4
commit a6d3186a47
2 changed files with 22 additions and 0 deletions

View File

@ -40,6 +40,10 @@ int GPIOBUS::CommandHandShake(vector<uint8_t> &buf)
bool ack = WaitACK(true);
#ifndef SCSI_COMPLIANT_HANDSHAKE
SysTimer::SleepNsec(SCSI_DELAY_BUS_SETTLE_DELAY_NS);
#endif
buf[0] = GetDAT();
SetREQ(false);
@ -64,6 +68,10 @@ int GPIOBUS::CommandHandShake(vector<uint8_t> &buf)
ack = WaitACK(true);
#ifndef SCSI_COMPLIANT_HANDSHAKE
SysTimer::SleepNsec(SCSI_DELAY_BUS_SETTLE_DELAY_NS);
#endif
// Get the actual SCSI command
buf[0] = GetDAT();
@ -94,6 +102,10 @@ int GPIOBUS::CommandHandShake(vector<uint8_t> &buf)
ack = WaitACK(true);
#ifndef SCSI_COMPLIANT_HANDSHAKE
SysTimer::SleepNsec(SCSI_DELAY_BUS_SETTLE_DELAY_NS);
#endif
buf[offset] = GetDAT();
SetREQ(false);
@ -122,6 +134,10 @@ int GPIOBUS::ReceiveHandShake(uint8_t *buf, int count)
const bool ack = WaitACK(true);
#ifndef SCSI_COMPLIANT_HANDSHAKE
SysTimer::SleepNsec(SCSI_DELAY_BUS_SETTLE_DELAY_NS);
#endif
*buf = GetDAT();
SetREQ(false);
@ -149,6 +165,9 @@ int GPIOBUS::ReceiveHandShake(uint8_t *buf, int count)
break;
}
#ifndef SCSI_COMPLIANT_HANDSHAKE
SysTimer::SleepNsec(SCSI_DELAY_BUS_SETTLE_DELAY_NS);
#endif
*buf = GetDAT();

View File

@ -21,3 +21,6 @@
#if defined(__x86_64__) || defined(__X86__) || !defined(__linux__)
#undef USE_SEL_EVENT_ENABLE
#endif
// Use improved SCSI compliant handshake which does not require the system timer and provides a small performance benefit
#define SCSI_COMPLIANT_HANDSHAKE