mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
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...!
This commit is contained in:
parent
8a91b90258
commit
ad909e7c3f
1 changed files with 1 additions and 2 deletions
|
@ -198,7 +198,6 @@ bool FloppyDiskDevice::read_sectors_with_dma(u16 lba, u16 count, u8* outbuf)
|
||||||
static_cast<void>(pcn);
|
static_cast<void>(pcn);
|
||||||
|
|
||||||
memcpy(outbuf, m_dma_buffer_page->paddr().as_ptr(), 512 * count);
|
memcpy(outbuf, m_dma_buffer_page->paddr().as_ptr(), 512 * count);
|
||||||
//kprintf("fdc: 0x%x\n", *outbuf);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -400,7 +399,7 @@ bool FloppyDiskDevice::recalibrate()
|
||||||
wait_for_irq();
|
wait_for_irq();
|
||||||
m_interrupted = false;
|
m_interrupted = false;
|
||||||
|
|
||||||
send_byte(FloppyCommand::Recalibrate);
|
send_byte(FloppyCommand::SenseInterrupt);
|
||||||
u8 st0 = read_byte();
|
u8 st0 = read_byte();
|
||||||
u8 pcn = read_byte();
|
u8 pcn = read_byte();
|
||||||
static_cast<void>(st0);
|
static_cast<void>(st0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue