From 83aa868c17483e7ed37686461b5e2f9e8566e8c3 Mon Sep 17 00:00:00 2001 From: Liav A Date: Sat, 22 Feb 2020 20:08:20 +0200 Subject: [PATCH] Kernel: Update PATAChannel class to use the PCI::Device class PATAChannel class will inherit from the PCI::Device class, thus, can still implement IRQ handling. --- Kernel/Devices/PATAChannel.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Kernel/Devices/PATAChannel.h b/Kernel/Devices/PATAChannel.h index 02da8e6bf6..ba8264ab5f 100644 --- a/Kernel/Devices/PATAChannel.h +++ b/Kernel/Devices/PATAChannel.h @@ -38,9 +38,9 @@ #include #include -#include #include #include +#include #include #include #include @@ -54,7 +54,7 @@ struct PhysicalRegionDescriptor { }; class PATADiskDevice; -class PATAChannel final : public IRQHandler { +class PATAChannel final : public PCI::Device { friend class PATADiskDevice; AK_MAKE_ETERNAL public: @@ -65,7 +65,7 @@ public: public: static OwnPtr create(ChannelType type, bool force_pio); - PATAChannel(ChannelType type, bool force_pio); + PATAChannel(PCI::Address address, ChannelType type, bool force_pio); virtual ~PATAChannel() override; RefPtr master_device() { return m_master; }; @@ -73,7 +73,7 @@ public: private: //^ IRQHandler - virtual void handle_irq() override; + virtual void handle_irq(RegisterState&) override; void initialize(bool force_pio); void detect_disks(); @@ -92,7 +92,6 @@ private: WaitQueue m_irq_queue; - PCI::Address m_pci_address; PhysicalRegionDescriptor& prdt() { return *reinterpret_cast(m_prdt_page->paddr().offset(0xc0000000).as_ptr()); } RefPtr m_prdt_page; RefPtr m_dma_buffer_page; @@ -102,5 +101,4 @@ private: RefPtr m_master; RefPtr m_slave; }; - }