diff options
author | gonzo <gonzo@FreeBSD.org> | 2012-12-13 03:33:01 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2012-12-13 03:33:01 +0000 |
commit | 683cd4b31a93f19068956a9f066f7946db88dec3 (patch) | |
tree | 41f0eadf89b4903c178cbd483c23e3c42d0f6cff /sys | |
parent | 63443f66106ad3d19b44ededfdb8f7eaffbbde39 (diff) | |
download | FreeBSD-src-683cd4b31a93f19068956a9f066f7946db88dec3.zip FreeBSD-src-683cd4b31a93f19068956a9f066f7946db88dec3.tar.gz |
Disable interrupts in filter in order to avoid interrupt storm and
CPU starvation
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/smc/if_smc.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/smc/if_smc.c b/sys/dev/smc/if_smc.c index 06f6ca0..f6df350 100644 --- a/sys/dev/smc/if_smc.c +++ b/sys/dev/smc/if_smc.c @@ -807,6 +807,10 @@ smc_intr(void *context) struct smc_softc *sc; sc = (struct smc_softc *)context; + /* + * Block interrupts in order to let smc_task_intr to kick in + */ + smc_write_1(sc, MSK, 0); taskqueue_enqueue_fast(sc->smc_tq, &sc->smc_intr); return (FILTER_HANDLED); } @@ -827,13 +831,6 @@ smc_task_intr(void *context, int pending) smc_select_bank(sc, 2); /* - * Get the current mask, and then block all interrupts while we're - * working. - */ - if ((ifp->if_capenable & IFCAP_POLLING) == 0) - smc_write_1(sc, MSK, 0); - - /* * Find out what interrupts are flagged. */ status = smc_read_1(sc, IST) & sc->smc_mask; |