diff options
author | Liav A <liavalb@gmail.com> | 2021-03-27 09:01:00 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-27 16:40:16 +0100 |
commit | 833a6bd047e91b648c4d7c24ae518163df10b9f6 (patch) | |
tree | 439e0e8a4f212b87cf2e2a87559edc3ef9d25c44 /Kernel/Storage/PATADiskDevice.cpp | |
parent | dfb6b296cf9ae8b5afa19cf2ea6813f0d774fcb1 (diff) | |
download | serenity-833a6bd047e91b648c4d7c24ae518163df10b9f6.zip |
Kernel/Storage: Move IDE bus master handling code into a separate class
If the user requests to force PIO mode, we just create IDEChannel
objects which are capable of sending PIO commands only.
However, if the user doesn't force PIO mode, we create BMIDEChannel
objects, which are sending DMA commands.
This change is somewhat simplifying the code, so each class is
supporting its type of operation - PIO or DMA. The PATADiskDevice
should not care if DMA is enabled or not.
Later on, we could write an IDEChannel class for UDMA modes,
that are available and documented on Intel specifications for their IDE
controllers.
Diffstat (limited to 'Kernel/Storage/PATADiskDevice.cpp')
-rw-r--r-- | Kernel/Storage/PATADiskDevice.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Storage/PATADiskDevice.cpp b/Kernel/Storage/PATADiskDevice.cpp index 1e6b6cba29..d75baf5311 100644 --- a/Kernel/Storage/PATADiskDevice.cpp +++ b/Kernel/Storage/PATADiskDevice.cpp @@ -58,8 +58,7 @@ const char* PATADiskDevice::class_name() const void PATADiskDevice::start_request(AsyncBlockDeviceRequest& request) { - bool use_dma = !m_channel->m_io_group.bus_master_base().is_null() && m_channel->m_dma_enabled.resource(); - m_channel->start_request(request, use_dma, is_slave(), m_capabilities); + m_channel->start_request(request, is_slave(), m_capabilities); } String PATADiskDevice::device_name() const |