From a34123265666cd735d9e0ba9bdfc7b66d6853a55 Mon Sep 17 00:00:00 2001 From: Michael McMaster Date: Tue, 28 Nov 2017 20:45:57 +1000 Subject: [PATCH] Fix sync error after scsi reset --- src/firmware/scsi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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) -- 2.38.5