summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-02-27 21:34:59 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-02-27 21:34:59 +0000
commitc171dfce3d71a3c4b3828ec29f9f4f64485884e2 (patch)
tree6f5a8e78cb2abfa4bc07fb1463d849eb720cd796
parentf85b5119bd1a61bd497621f0ff99043fb6590902 (diff)
Disable interrupts in wi_intr() before sending an ACK. Fixes a
race condition and makes things consistent with the rest of the code. From NetBSD. OK deraadt@
-rw-r--r--sys/dev/ic/if_wi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index 510e3ec2303..dd148354b5c 100644
--- a/sys/dev/ic/if_wi.c
+++ b/sys/dev/ic/if_wi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi.c,v 1.102 2003/12/05 02:23:42 drahn Exp $ */
+/* $OpenBSD: if_wi.c,v 1.103 2004/02/27 21:34:58 millert Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -126,7 +126,7 @@ u_int32_t widebug = WIDEBUG;
#if !defined(lint) && !defined(__OpenBSD__)
static const char rcsid[] =
- "$OpenBSD: if_wi.c,v 1.102 2003/12/05 02:23:42 drahn Exp $";
+ "$OpenBSD: if_wi.c,v 1.103 2004/02/27 21:34:58 millert Exp $";
#endif /* lint */
#ifdef foo
@@ -451,8 +451,8 @@ wi_intr(vsc)
ifp = &sc->sc_arpcom.ac_if;
if (!(sc->wi_flags & WI_FLAGS_ATTACHED) || !(ifp->if_flags & IFF_UP)) {
- CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF);
CSR_WRITE_2(sc, WI_INT_EN, 0);
+ CSR_WRITE_2(sc, WI_EVENT_ACK, 0xffff);
return (0);
}