IDEDiskDevice: Fix build after merging slave device changes.

This commit is contained in:
Andreas Kling 2019-07-08 08:20:12 +02:00
parent 3c71dc4320
commit 34709a2c24
Notes: sideshowbarker 2024-07-19 13:22:41 +09:00

View File

@ -297,13 +297,12 @@ bool IDEDiskDevice::read_sectors_with_dma(u32 lba, u16 count, u8* outbuf)
while (IO::in8(m_io_base + ATA_REG_STATUS) & ATA_SR_BSY)
;
bool is_slave = false;
u8 devsel = 0xe0;
if (is_slave())
devsel |= 0x10;
IO::out8(m_io_base + ATA_REG_CONTROL, 0);
IO::out8(m_io_base + ATA_REG_HDDEVSEL, devsel | (is_slave << 4));
IO::out8(m_io_base + ATA_REG_HDDEVSEL, devsel | (is_slave() << 4));
wait_400ns(m_io_base);
IO::out8(m_io_base + ATA_REG_FEATURES, 0);
@ -427,13 +426,12 @@ bool IDEDiskDevice::write_sectors_with_dma(u32 lba, u16 count, const u8* inbuf)
while (IO::in8(m_io_base + ATA_REG_STATUS) & ATA_SR_BSY)
;
bool is_slave = false;
u8 devsel = 0xe0;
if (is_slave())
devsel |= 0x10;
IO::out8(m_io_base + ATA_REG_CONTROL, 0);
IO::out8(m_io_base + ATA_REG_HDDEVSEL, devsel | (is_slave << 4));
IO::out8(m_io_base + ATA_REG_HDDEVSEL, devsel | (is_slave() << 4));
wait_400ns(m_io_base);
IO::out8(m_io_base + ATA_REG_FEATURES, 0);