mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
There's basically no real difference in software between a SATA harddisk and IDE harddisk. The difference in the implementation is for the host bus adapter protocol and registers layout. Therefore, there's no point in putting a distinction in software to these devices. This change also greatly simplifies and removes stale APIs and removes unnecessary parameters in constructor calls, which tighten things further everywhere.
36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
/*
|
|
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <AK/StringView.h>
|
|
#include <Kernel/Sections.h>
|
|
#include <Kernel/Storage/ATADevice.h>
|
|
#include <Kernel/Storage/IDEChannel.h>
|
|
#include <Kernel/Storage/IDEController.h>
|
|
#include <Kernel/Storage/StorageManagement.h>
|
|
|
|
namespace Kernel {
|
|
|
|
ATADevice::ATADevice(const ATAController& controller, ATADevice::Address ata_address, unsigned minor_number, u16 capabilities, u16 logical_sector_size, u64 max_addressable_block, NonnullOwnPtr<KString> early_storage_name)
|
|
: StorageDevice(StorageManagement::major_number(), minor_number, logical_sector_size, max_addressable_block, move(early_storage_name))
|
|
, m_controller(controller)
|
|
, m_ata_address(ata_address)
|
|
, m_capabilities(capabilities)
|
|
{
|
|
}
|
|
|
|
ATADevice::~ATADevice()
|
|
{
|
|
}
|
|
|
|
void ATADevice::start_request(AsyncBlockDeviceRequest& request)
|
|
{
|
|
auto controller = m_controller.strong_ref();
|
|
VERIFY(controller);
|
|
controller->start_request(*this, request);
|
|
}
|
|
|
|
}
|