From d2d9ab366b2697c3e7f526c1e31140440d114e7f Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Sun, 30 Dec 2007 00:23:38 +0000 Subject: [PATCH] Correct the comments in am7990_intr() and am79900_intr(); it's not possible to end up in the interrupt handler again while processing the previous RX interrupt in ifp->if_input() because the MD interrupt code disables the delivery of the respective interrupt until all associated handlers were called (in the INTR_FILTER case the MI code supposedly does the same). Toggling the NIC interrupt enable bit in these handlers still is necessary though as some chips (f.e. the VMware emulated one) require this to be done in order to keep issuing interrupts. MFC after: 1 month --- sys/dev/le/am7990.c | 7 +++---- sys/dev/le/am79900.c | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/dev/le/am7990.c b/sys/dev/le/am7990.c index 10a809d97d10..56a07d5330d2 100644 --- a/sys/dev/le/am7990.c +++ b/sys/dev/le/am7990.c @@ -421,10 +421,9 @@ am7990_intr(void *arg) * Clear interrupt source flags and turn off interrupts. If we * don't clear these flags before processing their sources we * could completely miss some interrupt events as the NIC can - * change these flags while we're in this handler. We turn off - * interrupts so we don't get another RX interrupt while still - * processing the previous one in ifp->if_input() with the - * driver lock dropped. + * change these flags while we're in this handler. We toggle + * the interrupt enable bit in order to keep receiving them + * (some chips work without this, some don't). */ (*sc->sc_wrcsr)(sc, LE_CSR0, isr & ~(LE_C0_INEA | LE_C0_TDMD | LE_C0_STOP | LE_C0_STRT | LE_C0_INIT)); diff --git a/sys/dev/le/am79900.c b/sys/dev/le/am79900.c index abaed2dc3b64..5129eb60f7da 100644 --- a/sys/dev/le/am79900.c +++ b/sys/dev/le/am79900.c @@ -459,10 +459,9 @@ am79900_intr(void *arg) * Clear interrupt source flags and turn off interrupts. If we * don't clear these flags before processing their sources we * could completely miss some interrupt events as the NIC can - * change these flags while we're in this handler. We turn off - * interrupts so we don't get another RX interrupt while still - * processing the previous one in ifp->if_input() with the - * driver lock dropped. + * change these flags while we're in this handler. We toggle + * the interrupt enable bit in order to keep receiving them + * (some chips work without this, some don't). */ (*sc->sc_wrcsr)(sc, LE_CSR0, isr & ~(LE_C0_INEA | LE_C0_TDMD | LE_C0_STOP | LE_C0_STRT | LE_C0_INIT));