Kernel/Storage: Remove the stale ATAPIDiscDevice class

We don't really support ATAPI (SCSI packets over ATA channels) and it's
uncertain if we ever will support such type of media. For this reason,
there's basically no reason to keep this code.
If we ever introduce ATAPI support into the Kernel, we can simply put
this back into the codebase.
This commit is contained in:
Liav A 2022-08-05 13:22:01 +03:00 committed by Linus Groh
parent 1102089f9f
commit 423dc71cc8
Notes: sideshowbarker 2024-07-17 08:18:49 +09:00
3 changed files with 0 additions and 76 deletions

View File

@ -101,7 +101,6 @@ set(KERNEL_SOURCES
Storage/ATA/GenericIDE/PCIController.cpp
Storage/ATA/ATADevice.cpp
Storage/ATA/ATADiskDevice.cpp
Storage/ATA/ATAPIDiscDevice.cpp
Storage/ATA/ATAPort.cpp
Storage/NVMe/NVMeController.cpp
Storage/NVMe/NVMeNameSpace.cpp

View File

@ -1,39 +0,0 @@
/*
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/StringView.h>
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Sections.h>
#include <Kernel/Storage/ATA/ATAPIDiscDevice.h>
#include <Kernel/Storage/StorageManagement.h>
namespace Kernel {
NonnullRefPtr<ATAPIDiscDevice> ATAPIDiscDevice::create(ATAController const& controller, ATADevice::Address ata_address, u16 capabilities, u64 max_addressable_block)
{
auto minor_device_number = StorageManagement::generate_storage_minor_number();
auto device_name = MUST(KString::formatted("hd{:c}", 'a' + minor_device_number.value()));
auto disc_device_or_error = DeviceManagement::try_create_device<ATAPIDiscDevice>(controller, ata_address, minor_device_number.value(), capabilities, max_addressable_block, move(device_name));
// FIXME: Find a way to propagate errors
VERIFY(!disc_device_or_error.is_error());
return disc_device_or_error.release_value();
}
ATAPIDiscDevice::ATAPIDiscDevice(ATAController const& controller, ATADevice::Address ata_address, MinorNumber minor_number, u16 capabilities, u64 max_addressable_block, NonnullOwnPtr<KString> early_storage_name)
: ATADevice(controller, ata_address, minor_number, capabilities, 0, max_addressable_block, move(early_storage_name))
{
}
ATAPIDiscDevice::~ATAPIDiscDevice() = default;
StringView ATAPIDiscDevice::class_name() const
{
return "ATAPIDiscDevice"sv;
}
}

View File

@ -1,36 +0,0 @@
/*
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Storage/ATA/ATADevice.h>
namespace Kernel {
class IDEController;
class IDEChannel;
class ATAPIDiscDevice final : public ATADevice {
friend class IDEController;
friend class DeviceManagement;
public:
static NonnullRefPtr<ATAPIDiscDevice> create(ATAController const&, ATADevice::Address, u16 capabilities, u64 max_addressable_block);
virtual ~ATAPIDiscDevice() override;
// ^StorageDevice
virtual CommandSet command_set() const override { return CommandSet::SCSI; }
private:
virtual InterfaceType interface_type() const override { return InterfaceType::ATA; }
ATAPIDiscDevice(ATAController const&, Address, MinorNumber, u16, u64, NonnullOwnPtr<KString>);
// ^DiskDevice
virtual StringView class_name() const override;
};
}