From ad909e7c3f28cbdba269ac5cfcd01a84f482c3c2 Mon Sep 17 00:00:00 2001 From: Jesse Date: Sun, 18 Aug 2019 00:26:53 +1000 Subject: [PATCH] FloppyDiskDevice: Fixed hang on wait_for_irq() (#458) It turns out that the `SenseInterrupt` command is actually very important! The system hangs if it's not there! Whoops...! --- Kernel/Devices/FloppyDiskDevice.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Kernel/Devices/FloppyDiskDevice.cpp b/Kernel/Devices/FloppyDiskDevice.cpp index de8f03ab87..632a8b5d5f 100644 --- a/Kernel/Devices/FloppyDiskDevice.cpp +++ b/Kernel/Devices/FloppyDiskDevice.cpp @@ -198,7 +198,6 @@ bool FloppyDiskDevice::read_sectors_with_dma(u16 lba, u16 count, u8* outbuf) static_cast(pcn); memcpy(outbuf, m_dma_buffer_page->paddr().as_ptr(), 512 * count); - //kprintf("fdc: 0x%x\n", *outbuf); return true; } @@ -400,7 +399,7 @@ bool FloppyDiskDevice::recalibrate() wait_for_irq(); m_interrupted = false; - send_byte(FloppyCommand::Recalibrate); + send_byte(FloppyCommand::SenseInterrupt); u8 st0 = read_byte(); u8 pcn = read_byte(); static_cast(st0);