From 833a6bd047e91b648c4d7c24ae518163df10b9f6 Mon Sep 17 00:00:00 2001 From: Liav A Date: Sat, 27 Mar 2021 09:01:00 +0300 Subject: 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. --- Kernel/Storage/PATADiskDevice.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Kernel/Storage/PATADiskDevice.cpp') 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 -- cgit v1.2.3