/* * Copyright (c) 2021, Liav A. * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include #include #include 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 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); } }