diff options
author | dzwdz | 2023-01-25 21:49:14 +0100 |
---|---|---|
committer | dzwdz | 2023-01-25 21:49:14 +0100 |
commit | f9ce893e143a7c2356a0f2204afac1f37d3e54d2 (patch) | |
tree | e93e569328ea61b71e785a52964238dc032aeefd /src/kernel/arch/amd64/driver/rtl8139.c | |
parent | c24a9376b4a048a3f9408df2d47eaad367459bd7 (diff) |
kernel/irq: use a lookup table for irqs
Diffstat (limited to 'src/kernel/arch/amd64/driver/rtl8139.c')
-rw-r--r-- | src/kernel/arch/amd64/driver/rtl8139.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kernel/arch/amd64/driver/rtl8139.c b/src/kernel/arch/amd64/driver/rtl8139.c index d0e4d90..bf8a67a 100644 --- a/src/kernel/arch/amd64/driver/rtl8139.c +++ b/src/kernel/arch/amd64/driver/rtl8139.c @@ -1,5 +1,6 @@ #include <kernel/arch/amd64/driver/rtl8139.h> #include <kernel/arch/amd64/driver/util.h> +#include <kernel/arch/amd64/interrupts.h> #include <kernel/arch/amd64/pci.h> #include <kernel/arch/amd64/port_io.h> #include <kernel/panic.h> @@ -47,6 +48,7 @@ static void rx_irq_enable(bool v) { void rtl8139_init(uint32_t bdf) { if (iobase) panic_unimplemented(); /* multiple devices */ iobase = pcicfg_iobase(bdf); + irq_fn[IRQ_RTL8139] = rtl8139_irq; /* also includes the status, because i have only implemented w32 */ uint32_t cmd = pcicfg_r32(bdf, PCICFG_CMD); |