From 5abcc66cb6e83f02b5218802d3eca74c0d29bebf Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 17 Aug 2022 18:05:43 +0200 Subject: user/net: answer to ARP --- src/kernel/arch/amd64/driver/rtl8139.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (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 5b09027..428d675 100644 --- a/src/kernel/arch/amd64/driver/rtl8139.c +++ b/src/kernel/arch/amd64/driver/rtl8139.c @@ -39,7 +39,7 @@ static size_t rxpos; static char txbuf[4][txbuf_len]; static void rx_irq_enable(bool v) { - uint16_t mask = 1 | 4; /* rx/tx ok */ + uint16_t mask = 1; /* rx ok */ port_out16(iobase + INTRMASK, v ? mask : 0); } @@ -85,11 +85,11 @@ void rtl8139_init(uint32_t bdf) { void rtl8139_irq(void) { uint16_t status = port_in16(iobase + INTRSTATUS); - if (status != 1) { + if (!(status & 1)) { kprintf("bad rtl8139 status 0x%x\n", status); panic_unimplemented(); } - // TODO don't assume this is an rx irq + status &= 1; do { if (blocked_on) { -- cgit v1.2.3