Fix terrible performance
[SCSI2SD-V6.git] / src / firmware / disk.c
index b8c54a2..2e69d48 100755 (executable)
@@ -553,14 +553,6 @@ void scsiDiskPoll()
                        likely(scsiDev.phase == DATA_IN) &&\r
                        likely(!scsiDev.resetFlag))\r
                {\r
-                       // Wait for the next DMA interrupt. It's beneficial to halt the\r
-                       // processor to give the DMA controller more memory bandwidth to\r
-                       // work with.\r
-                       if (sdActive && scsiActive)\r
-                       {\r
-                               __WFI();\r
-                       }\r
-\r
                        if (sdActive && sdReadDMAPoll())\r
                        {\r
                                prep += sdActive;\r
@@ -574,11 +566,13 @@ void scsiDiskPoll()
                                // Start an SD transfer if we have space.\r
                                uint32_t startBuffer = prep % buffers;\r
                                uint32_t sectors = totalSDSectors - prep;\r
+#if 0\r
                                if (!scsiActive && prep == i)\r
                                {\r
                                        sectors = 1; // We need to get some data to send ASAP !\r
                                }\r
                                else\r
+#endif\r
                                {\r
                                        uint32_t freeBuffers = buffers - (prep - i);\r
                                        uint32_t contiguousBuffers = buffers - startBuffer;\r
@@ -616,7 +610,6 @@ void scsiDiskPoll()
                        likely(scsiDev.phase == DATA_IN) &&\r
                        likely(!scsiDev.resetFlag))\r
                {\r
-                       __WFI();\r
                }\r
 \r
 \r