From f9ce893e143a7c2356a0f2204afac1f37d3e54d2 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 25 Jan 2023 21:49:14 +0100 Subject: kernel/irq: use a lookup table for irqs --- src/kernel/arch/amd64/driver/rtl8139.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/kernel/arch/amd64/driver/rtl8139.c') 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 #include +#include #include #include #include @@ -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); -- cgit v1.2.3