From: Michael McMaster Date: Tue, 28 Nov 2017 10:45:57 +0000 (+1000) Subject: Fix sync error after scsi reset X-Git-Tag: v6.1.2~1 X-Git-Url: http://git.codesrc.com/gitweb.cgi?a=commitdiff_plain;h=a34123265666cd735d9e0ba9bdfc7b66d6853a55;p=SCSI2SD-V6.git Fix sync error after scsi reset --- diff --git a/src/firmware/scsi.c b/src/firmware/scsi.c index 78dfbf42..e5528bfc 100755 --- a/src/firmware/scsi.c +++ b/src/firmware/scsi.c @@ -508,8 +508,8 @@ static void scsiReset() for (int i = 0; i < S2S_MAX_TARGETS; ++i) { - scsiDev.target[i].syncOffset = 0; - scsiDev.target[i].syncPeriod = 0; + scsiDev.targets[i].syncOffset = 0; + scsiDev.targets[i].syncPeriod = 0; } scsiDev.minSyncPeriod = 0; @@ -898,11 +898,9 @@ void scsiPoll(void) if (unlikely(scsiDev.resetFlag)) { scsiReset(); - if ((scsiDev.resetFlag = scsiStatusRST())) - { - // Still in reset phase. Do not try and process any commands. - return; - } + // Still in reset phase for a few ms. + // Do not try and process any commands. + return; } switch (scsiDev.phase)