1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:47:34 +00:00

Kernel: Replace IRQHandler with the new InterruptHandler class

System components that need an IRQ handling are now inheriting the
InterruptHandler class.

In addition to that, the initialization process of PATAChannel was
changed to fit the changes.
PATAChannel, E1000NetworkAdapter and RTL8139NetworkAdapter are now
inheriting from PCI::Device instead of InterruptHandler directly.
This commit is contained in:
Liav A 2020-01-21 13:23:03 +02:00 committed by Andreas Kling
parent 1ee37245cd
commit 6c72736b26
29 changed files with 193 additions and 169 deletions

View file

@ -27,23 +27,23 @@
#pragma once
#include <AK/OwnPtr.h>
#include <Kernel/IRQHandler.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/PCI/Device.h>
class E1000NetworkAdapter final : public NetworkAdapter
, public IRQHandler {
, public PCI::Device {
public:
static OwnPtr<E1000NetworkAdapter> autodetect();
E1000NetworkAdapter(PCI::Address, u8 irq);
E1000NetworkAdapter(PCI::Address, u8 interrupt_vector);
virtual ~E1000NetworkAdapter() override;
virtual void send_raw(const u8*, int) override;
virtual bool link_up() override;
private:
virtual void handle_irq() override;
virtual void handle_interrupt() override;
virtual const char* class_name() const override { return "E1000NetworkAdapter"; }
struct [[gnu::packed]] e1000_rx_desc
@ -86,7 +86,6 @@ private:
void receive();
PCI::Address m_pci_address;
u16 m_io_base { 0 };
VirtualAddress m_mmio_base;
OwnPtr<Region> m_mmio_region;