diff options
author | dzwdz | 2022-08-17 18:05:43 +0200 |
---|---|---|
committer | dzwdz | 2022-08-17 18:05:43 +0200 |
commit | 5abcc66cb6e83f02b5218802d3eca74c0d29bebf (patch) | |
tree | aba71091a8ef27723c7bd3c013331fc4970f9f9e /src/kernel/arch/amd64/driver/rtl8139.c | |
parent | e05938ac4acd42d8acac123a880cae9582a93611 (diff) |
user/net: answer to ARP
Diffstat (limited to 'src/kernel/arch/amd64/driver/rtl8139.c')
-rw-r--r-- | src/kernel/arch/amd64/driver/rtl8139.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |