From 10407061d21abcfbc0c63e37314f4ae3938e3e25 Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 16 Jun 2020 15:17:00 -0600 Subject: [PATCH] PATA: Avoid double-preparing for irq --- Kernel/Devices/PATAChannel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Kernel/Devices/PATAChannel.cpp b/Kernel/Devices/PATAChannel.cpp index 1fc75745bd..b323fd38b6 100644 --- a/Kernel/Devices/PATAChannel.cpp +++ b/Kernel/Devices/PATAChannel.cpp @@ -452,7 +452,8 @@ bool PATAChannel::ata_read_sectors(u32 lba, u16 count, u8* outbuf, bool slave_re m_io_base.offset(ATA_REG_COMMAND).out(ATA_CMD_READ_PIO); for (int i = 0; i < count; i++) { - prepare_for_irq(); + if (i > 0) + prepare_for_irq(); wait_for_irq(); if (m_device_error) return false;