Pārlūkot izejas kodu

Fix an existing bug for TIMER DMA phy mode

The waiting for the last ACK to go low in `scsi_accel_dma.cpp:388`
timeout was too quick for an Adaptec AHA-2940AU. The timeout was based
on the iteration count through a tight loop. It has been switched
to a 500 millisecond timeout check.

Comments about right aligned vendor and product id SCSI strings
have been removed as they are misleading.
Morio 2 gadi atpakaļ
vecāks
revīzija
7cbf0fe81d

+ 2 - 2
lib/ZuluSCSI_platform_GD32F205/scsi_accel_dma.cpp

@@ -386,10 +386,10 @@ extern "C" void SCSI_TIMER_DMACHB_IRQ()
         else
         {
             // Wait for final ACK to go low, shouldn't take long.
-            int maxwait = 10000;
+            uint32_t start = millis();
             while (TIMER_CNT(SCSI_TIMER) < 1)
             {
-                if (maxwait-- < 0)
+                if ((uint32_t)(millis() - start) > 500)
                 {
                     logmsg("SCSI_TIMER_DMACHB_IRQ: timeout waiting for final ACK");
                     break;

+ 1 - 2
src/ZuluSCSI_disk.h

@@ -74,9 +74,8 @@ struct image_config_t: public S2S_TargetCfg
     // Cue sheet file for CD-ROM images
     FsFile cuesheetfile;
 
-    // Right-align vendor / product type strings (for Apple)
+    // Right-align vendor / product type strings
     // Standard SCSI uses left alignment
-    // This field uses -1 for default when field is not set in .ini
     int rightAlignStrings;
 
     // Set Vendor / Product Id from image file name

+ 1 - 1
zuluscsi.ini

@@ -48,7 +48,7 @@
 #TypeModifier = 0  # Affects only INQUIRY response
 #SectorsPerTrack = 63
 #HeadsPerCylinder = 255
-#RightAlignStrings = 0 # Right-align SCSI vendor / product strings, defaults on if Quirks = 1
+#RightAlignStrings = 0 # Right-align SCSI vendor / product strings
 #PrefetchBytes = 8192 # Maximum number of bytes to prefetch after a read request, 0 to disable
 #ReinsertCDOnInquiry = 1 # Reinsert any ejected CD-ROM image on Inquiry command
 #ReinsertAfterEject = 1 # Reinsert next CD image after eject, if multiple images configured.