mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
IDEDiskDevice: Fix build after merging slave device changes.
This commit is contained in:
parent
3c71dc4320
commit
34709a2c24
Notes:
sideshowbarker
2024-07-19 13:22:41 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/34709a2c243
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user