[SeaBIOS] [PATCH] floppy: Make sure to yield() during floppy PIO

Kevin O'Connor kevin at koconnor.net
Sat Nov 29 19:05:49 CET 2014


The floppy Programmed IO code really should yield while the controller
is busy.

Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 src/hw/floppy.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/hw/floppy.c b/src/hw/floppy.c
index aa8583d..d60362a 100644
--- a/src/hw/floppy.c
+++ b/src/hw/floppy.c
@@ -244,6 +244,7 @@ floppy_pio(int command, u8 *param)
                 floppy_disable_controller();
                 return DISK_RET_ETIMEOUT;
             }
+            yield();
             continue;
         }
         if (sts & 0x40) {
@@ -277,6 +278,7 @@ floppy_pio(int command, u8 *param)
                 floppy_disable_controller();
                 return DISK_RET_ETIMEOUT;
             }
+            yield();
             continue;
         }
         if (i >= receive) {
-- 
1.9.3




More information about the SeaBIOS mailing list