mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +00:00
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.
This commit is contained in:
parent
dfb6b296cf
commit
833a6bd047
7 changed files with 341 additions and 163 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue