Explorar o código

Handle bus reset during read prefetch (#168)

Previously if a transfer error occurred and caused a bus reset,
the code could get stuck waiting in read prefetch loop.
Petteri Aimonen %!s(int64=2) %!d(string=hai) anos
pai
achega
e78301cc87
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/ZuluSCSI_disk.cpp

+ 1 - 1
src/ZuluSCSI_disk.cpp

@@ -1831,7 +1831,7 @@ static void diskDataIn()
             prefetch_sectors = img_sector_count - g_scsi_prefetch.sector;
         }
 
-        while (!scsiIsWriteFinished(NULL) && prefetch_sectors > 0)
+        while (!scsiIsWriteFinished(NULL) && prefetch_sectors > 0 && !scsiDev.resetFlag)
         {
             // Check if prefetch buffer is free
             g_disk_transfer.buffer = g_scsi_prefetch.buffer + g_scsi_prefetch.bytes;