mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
Kernel/Storage: Move all ATA related code to a new subdirectory
Like what happened with the PCI and USB code, this feels like the right thing to do because we can improve on the ATA capabilities and keep it distinguished from the rest of the subsystem.
This commit is contained in:
parent
648a139af3
commit
4dc3617f3c
Notes:
sideshowbarker
2024-07-18 01:13:24 +09:00
Author: https://github.com/supercomputer7
Commit: 4dc3617f3c
Pull-request: https://github.com/SerenityOS/serenity/pull/10895
23 changed files with 50 additions and 50 deletions
35
Kernel/Storage/ATA/ATADevice.cpp
Normal file
35
Kernel/Storage/ATA/ATADevice.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* 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/ATA/ATADevice.h>
|
||||
#include <Kernel/Storage/ATA/IDEChannel.h>
|
||||
#include <Kernel/Storage/ATA/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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue