Browse Source

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 năm trước cách đây
mục cha
commit
6acfecd8d2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;