Explorar o código

Fix error recovery problems with platform_poll()

The commit 104dddde63 added some wait loops, but these should
exit if SCSI reset occurs.
Petteri Aimonen %!s(int64=2) %!d(string=hai) anos
pai
achega
de9b1cc54c
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/BlueSCSI_disk.cpp

+ 2 - 2
src/BlueSCSI_disk.cpp

@@ -1487,7 +1487,7 @@ void scsiDiskStartRead(uint32_t lba, uint32_t blocks)
 
         if (transfer.currentBlock == transfer.blocks)
         {
-            while (!scsiIsWriteFinished(NULL))
+            while (!scsiIsWriteFinished(NULL) && !scsiDev.resetFlag)
             {
                 platform_poll();
                 diskEjectButtonUpdate(false);
@@ -1667,7 +1667,7 @@ static void diskDataIn()
         }
 #endif
 
-        while (!scsiIsWriteFinished(NULL))
+        while (!scsiIsWriteFinished(NULL) && !scsiDev.resetFlag)
         {
             platform_poll();
             diskEjectButtonUpdate(false);