Sfoglia il codice sorgente

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 2 anni fa
parent
commit
6acfecd8d2
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/BlueSCSI_disk.cpp

+ 1 - 1
src/BlueSCSI_disk.cpp

@@ -1830,7 +1830,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;