Преглед изворни кода

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 година
родитељ
комит
6acfecd8d2
1 измењених фајлова са 1 додато и 1 уклоњено
  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;