1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

Kernel/Storage: Unify all ATA devices

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.
This commit is contained in:
Liav A 2021-08-27 17:13:03 +03:00 committed by Andreas Kling
parent 9f501d7e71
commit 741c871bc1
29 changed files with 352 additions and 276 deletions

View file

@ -11,7 +11,7 @@
#include <AK/Types.h>
#include <Kernel/Sections.h>
#include <Kernel/Storage/AHCI.h>
#include <Kernel/Storage/StorageController.h>
#include <Kernel/Storage/ATAController.h>
#include <Kernel/Storage/StorageDevice.h>
namespace Kernel {
@ -19,7 +19,7 @@ namespace Kernel {
class AsyncBlockDeviceRequest;
class AHCIPortHandler;
class AHCIPort;
class AHCIController final : public StorageController
class AHCIController final : public ATAController
, public PCI::Device {
friend class AHCIPortHandler;
friend class AHCIPort;
@ -32,7 +32,7 @@ public:
virtual bool reset() override;
virtual bool shutdown() override;
virtual size_t devices_count() const override;
virtual void start_request(const StorageDevice&, AsyncBlockDeviceRequest&) override;
virtual void start_request(const ATADevice&, AsyncBlockDeviceRequest&) override;
virtual void complete_current_request(AsyncDeviceRequest::RequestResult) override;
const AHCI::HBADefinedCapabilities& hba_capabilities() const { return m_capabilities; };