From: Michael McMaster Date: Mon, 27 May 2019 10:02:08 +0000 (+1000) Subject: Fix SD card hotswap bug when the SCSI host is constantly polling X-Git-Tag: v4.8.3~1 X-Git-Url: http://git.codesrc.com/gitweb.cgi?a=commitdiff_plain;h=38597c1f25dd8e07c0000ee0f0a32ccbe40d4d66;p=SCSI2SD.git Fix SD card hotswap bug when the SCSI host is constantly polling --- diff --git a/software/SCSI2SD/src/main.c b/software/SCSI2SD/src/main.c index 114e8fb..aa144bd 100755 --- a/software/SCSI2SD/src/main.c +++ b/software/SCSI2SD/src/main.c @@ -94,7 +94,7 @@ int main() CyExitCriticalSection(interruptState); } } - else if (scsiDev.phase >= 0) + else if ((scsiDev.phase >= 0) && (blockDev.state & DISK_PRESENT)) { // don't waste time scanning SD cards while we're doing disk IO lastSDPoll = getTime_ms();