Fix sync error after scsi reset
authorMichael McMaster <michael@codesrc.com>
Tue, 28 Nov 2017 10:45:57 +0000 (20:45 +1000)
committerMichael McMaster <michael@codesrc.com>
Tue, 28 Nov 2017 10:45:57 +0000 (20:45 +1000)
src/firmware/scsi.c

index 78dfbf4..e5528bf 100755 (executable)
@@ -508,8 +508,8 @@ static void scsiReset()
 \r
        for (int i = 0; i < S2S_MAX_TARGETS; ++i)\r
        {\r
-               scsiDev.target[i].syncOffset = 0;\r
-               scsiDev.target[i].syncPeriod = 0;\r
+               scsiDev.targets[i].syncOffset = 0;\r
+               scsiDev.targets[i].syncPeriod = 0;\r
        }\r
        scsiDev.minSyncPeriod = 0;\r
 \r
@@ -898,11 +898,9 @@ void scsiPoll(void)
        if (unlikely(scsiDev.resetFlag))\r
        {\r
                scsiReset();\r
-               if ((scsiDev.resetFlag = scsiStatusRST()))\r
-               {\r
-                       // Still in reset phase. Do not try and process any commands.\r
-                       return;\r
-               }\r
+               // Still in reset phase for a few ms.\r
+               // Do not try and process any commands.\r
+               return;\r
        }\r
 \r
        switch (scsiDev.phase)\r