1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +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

@ -9,15 +9,15 @@
#include <AK/OwnPtr.h>
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/Storage/ATAController.h>
#include <Kernel/Storage/IDEChannel.h>
#include <Kernel/Storage/StorageController.h>
#include <Kernel/Storage/StorageDevice.h>
namespace Kernel {
class AsyncBlockDeviceRequest;
class IDEController final : public StorageController
class IDEController final : public ATAController
, public PCI::Device {
AK_MAKE_ETERNAL
public:
@ -28,7 +28,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;
bool is_bus_master_capable() const;