mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-10 02:29:33 +00:00
Added SCSI_COMPLIANT_HANDSHAKE switch
This commit is contained in:
parent
08e0f447b4
commit
a6d3186a47
|
@ -40,6 +40,10 @@ int GPIOBUS::CommandHandShake(vector<uint8_t> &buf)
|
||||||
|
|
||||||
bool ack = WaitACK(true);
|
bool ack = WaitACK(true);
|
||||||
|
|
||||||
|
#ifndef SCSI_COMPLIANT_HANDSHAKE
|
||||||
|
SysTimer::SleepNsec(SCSI_DELAY_BUS_SETTLE_DELAY_NS);
|
||||||
|
#endif
|
||||||
|
|
||||||
buf[0] = GetDAT();
|
buf[0] = GetDAT();
|
||||||
|
|
||||||
SetREQ(false);
|
SetREQ(false);
|
||||||
|
@ -64,6 +68,10 @@ int GPIOBUS::CommandHandShake(vector<uint8_t> &buf)
|
||||||
|
|
||||||
ack = WaitACK(true);
|
ack = WaitACK(true);
|
||||||
|
|
||||||
|
#ifndef SCSI_COMPLIANT_HANDSHAKE
|
||||||
|
SysTimer::SleepNsec(SCSI_DELAY_BUS_SETTLE_DELAY_NS);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Get the actual SCSI command
|
// Get the actual SCSI command
|
||||||
buf[0] = GetDAT();
|
buf[0] = GetDAT();
|
||||||
|
|
||||||
|
@ -94,6 +102,10 @@ int GPIOBUS::CommandHandShake(vector<uint8_t> &buf)
|
||||||
|
|
||||||
ack = WaitACK(true);
|
ack = WaitACK(true);
|
||||||
|
|
||||||
|
#ifndef SCSI_COMPLIANT_HANDSHAKE
|
||||||
|
SysTimer::SleepNsec(SCSI_DELAY_BUS_SETTLE_DELAY_NS);
|
||||||
|
#endif
|
||||||
|
|
||||||
buf[offset] = GetDAT();
|
buf[offset] = GetDAT();
|
||||||
|
|
||||||
SetREQ(false);
|
SetREQ(false);
|
||||||
|
@ -122,6 +134,10 @@ int GPIOBUS::ReceiveHandShake(uint8_t *buf, int count)
|
||||||
|
|
||||||
const bool ack = WaitACK(true);
|
const bool ack = WaitACK(true);
|
||||||
|
|
||||||
|
#ifndef SCSI_COMPLIANT_HANDSHAKE
|
||||||
|
SysTimer::SleepNsec(SCSI_DELAY_BUS_SETTLE_DELAY_NS);
|
||||||
|
#endif
|
||||||
|
|
||||||
*buf = GetDAT();
|
*buf = GetDAT();
|
||||||
|
|
||||||
SetREQ(false);
|
SetREQ(false);
|
||||||
|
@ -149,6 +165,9 @@ int GPIOBUS::ReceiveHandShake(uint8_t *buf, int count)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SCSI_COMPLIANT_HANDSHAKE
|
||||||
|
SysTimer::SleepNsec(SCSI_DELAY_BUS_SETTLE_DELAY_NS);
|
||||||
|
#endif
|
||||||
|
|
||||||
*buf = GetDAT();
|
*buf = GetDAT();
|
||||||
|
|
||||||
|
|
|
@ -21,3 +21,6 @@
|
||||||
#if defined(__x86_64__) || defined(__X86__) || !defined(__linux__)
|
#if defined(__x86_64__) || defined(__X86__) || !defined(__linux__)
|
||||||
#undef USE_SEL_EVENT_ENABLE
|
#undef USE_SEL_EVENT_ENABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Use improved SCSI compliant handshake which does not require the system timer and provides a small performance benefit
|
||||||
|
#define SCSI_COMPLIANT_HANDSHAKE
|
||||||
|
|
Loading…
Reference in New Issue
Block a user