diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-10-05 22:59:58 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-10-05 22:59:58 +0000 |
commit | 6ac253f2b62994cd00039df5bc4f015b5b7331d6 (patch) | |
tree | a1ad4dd2caa86e7251e7946eea636b7cf4d87d85 /sys | |
parent | 9d604b95c2e9970402cf060ad8dacec60b1de047 (diff) |
Disable interrupts in the interrupt handler. This is what FreeBSD does, and
it seems to fix the occasional watchdog timeout when using MSI.
tested by many
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/re.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index a0e30102328..5af3e80cefd 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.143 2013/08/07 01:06:30 bluhm Exp $ */ +/* $OpenBSD: re.c,v 1.144 2013/10/05 22:59:57 kettenis Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1650,6 +1650,9 @@ re_intr(void *arg) if (!(ifp->if_flags & IFF_RUNNING)) return (0); + /* Disable interrupts. */ + CSR_WRITE_2(sc, RL_IMR, 0); + rx = tx = 0; status = CSR_READ_2(sc, RL_ISR); /* If the card has gone away the read returns 0xffff. */ @@ -1716,6 +1719,8 @@ re_intr(void *arg) if (tx && !IFQ_IS_EMPTY(&ifp->if_snd)) re_start(ifp); + CSR_WRITE_2(sc, RL_IMR, sc->rl_intrs); + return (claimed); } |