Fix SD card hotswap bug when the SCSI host is constantly polling
authorMichael McMaster <michael@codesrc.com>
Mon, 27 May 2019 10:00:59 +0000 (20:00 +1000)
committerMichael McMaster <michael@codesrc.com>
Mon, 27 May 2019 10:00:59 +0000 (20:00 +1000)
src/firmware/main.c

index fea166c..ed37b5c 100755 (executable)
@@ -161,7 +161,7 @@ void mainLoop()
 #endif\r
                }\r
        }\r
-       else if (scsiDev.phase >= 0)\r
+       else if ((scsiDev.phase >= 0) && (blockDev.state & DISK_PRESENT))\r
        {\r
                // don't waste time scanning SD cards while we're doing disk IO\r
                lastSDPoll = s2s_getTime_ms();\r