From 38597c1f25dd8e07c0000ee0f0a32ccbe40d4d66 Mon Sep 17 00:00:00 2001 From: Michael McMaster Date: Mon, 27 May 2019 20:02:08 +1000 Subject: [PATCH] Fix SD card hotswap bug when the SCSI host is constantly polling --- software/SCSI2SD/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();