ソースを参照

PATA: Avoid double-preparing for irq

Tom 5 年 前
コミット
10407061d2
1 ファイル変更2 行追加1 行削除
  1. 2 1
      Kernel/Devices/PATAChannel.cpp

+ 2 - 1
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<u8>(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;