]> localhost Git - SCSI2SD.git/commitdiff
Fix SD card hotswap bug when the SCSI host is constantly polling
authorMichael McMaster <michael@codesrc.com>
Mon, 27 May 2019 10:02:08 +0000 (20:02 +1000)
committerMichael McMaster <michael@codesrc.com>
Mon, 27 May 2019 10:02:08 +0000 (20:02 +1000)
software/SCSI2SD/src/main.c

index 114e8fb4ce984279762ad89309fdbce7c9f3e1c8..aa144bde2c676cc8256d4196d6ce9f3ca1dc588d 100755 (executable)
@@ -94,7 +94,7 @@ int main()
                                CyExitCriticalSection(interruptState);\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 = getTime_ms();\r