diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-01-13 11:28:15 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-01-13 11:28:15 +0000 |
commit | 1c96781cdf4162be0ea3046a7a5f2a6f733b4db2 (patch) | |
tree | d5353aff713559c4d37f29ed1174cdfb6353b48b | |
parent | 00d90b146d125fa23c1edc8f902c111ad1b3032e (diff) |
Get rid of "forever" loop in the interrupt handler such that we drop out of the
interrupt handler if the "no rx buffer available" bit is set and no new mbufs
are available to populate descriptors. While it doesn't make livelock
mitigation work for everybody, it does resolve some lockup issues.
ok sthen@
-rw-r--r-- | sys/dev/pci/if_vr.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 6023d33a07c..e8ec0e4c093 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.106 2010/09/03 18:14:54 kettenis Exp $ */ +/* $OpenBSD: if_vr.c,v 1.107 2011/01/13 11:28:14 kettenis Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1048,15 +1048,11 @@ vr_intr(void *arg) /* Disable interrupts. */ CSR_WRITE_2(sc, VR_IMR, 0x0000); - for (;;) { - - status = CSR_READ_2(sc, VR_ISR); - if (status) - CSR_WRITE_2(sc, VR_ISR, status); - - if ((status & VR_INTRS) == 0) - break; + status = CSR_READ_2(sc, VR_ISR); + if (status) + CSR_WRITE_2(sc, VR_ISR, status); + if (status & VR_INTRS) { claimed = 1; if (status & VR_ISR_RX_OK) @@ -1092,7 +1088,7 @@ vr_intr(void *arg) sc->sc_dev.dv_xname); vr_reset(sc); vr_init(sc); - break; + status = 0; } if ((status & VR_ISR_TX_OK) || (status & VR_ISR_TX_ABRT) || |