]> xenbits.xensource.com Git - seabios.git/commitdiff
floppy: Reset the floppy motor count in floppy_drive_pio()
authorNikolay Nikolov <nickysn@users.sourceforge.net>
Sun, 4 Feb 2018 15:27:00 +0000 (17:27 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 8 Feb 2018 02:19:38 +0000 (21:19 -0500)
Reset the floppy motor count, so the motor keeps spinning 2 seconds
after a floppy operation, performed by floppy_drive_pio().

Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
src/hw/floppy.c

index 573c45f50b4d0aa7f0b10345375322ae9fc441db..77dbade3153dfc0933300423256f210539bb6cb4 100644 (file)
@@ -356,6 +356,7 @@ floppy_drive_pio(u8 floppyid, int command, u8 *param)
 
     // Send command.
     int ret = floppy_pio(command, param);
+    SET_BDA(floppy_motor_counter, FLOPPY_MOTOR_TICKS); // reset motor timeout
     if (ret)
         return ret;