Work around bochs floppy issue with wait_irq().
authorKevin O'Connor <kevin@koconnor.net>
Sun, 17 Jan 2010 18:00:49 +0000 (13:00 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 17 Jan 2010 18:00:49 +0000 (13:00 -0500)
Bochs turns off floppy dma when cpu is halted, so work around problem.

src/floppy.c

index a7bd0ddd23cf59c8f86bab4f209ff38ca44d91cb..dba3e00428139ffa21280addbd1417fab7076af1 100644 (file)
@@ -182,7 +182,9 @@ wait_floppy_irq(void)
         v = GET_BDA(floppy_recalibration_status);
         if (v & FRS_TIMEOUT)
             break;
-        wait_irq();
+        // Could use wait_irq() here, but that causes issues on
+        // bochs, so use yield() instead.
+        yield();
     }
 
     v &= ~FRS_TIMEOUT;