Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic disable interrupts when we get an rfsilent event, ...



details:   https://anonhg.NetBSD.org/src/rev/6549ff4599e2
branches:  trunk
changeset: 338553:6549ff4599e2
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat May 30 00:56:42 2015 +0000

description:
disable interrupts when we get an rfsilent event, and make sure to clear intr sync cause register

diffstat:

 sys/dev/ic/arn5008.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r fb6afec7ecf8 -r 6549ff4599e2 sys/dev/ic/arn5008.c
--- a/sys/dev/ic/arn5008.c      Fri May 29 23:18:30 2015 +0000
+++ b/sys/dev/ic/arn5008.c      Sat May 30 00:56:42 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arn5008.c,v 1.8 2015/05/24 17:19:29 matt Exp $ */
+/*     $NetBSD: arn5008.c,v 1.9 2015/05/30 00:56:42 jmcneill Exp $     */
 /*     $OpenBSD: ar5008.c,v 1.21 2012/08/25 12:14:31 kettenis Exp $    */
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 1.8 2015/05/24 17:19:29 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 1.9 2015/05/30 00:56:42 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -1257,8 +1257,9 @@
 
                if ((sc->sc_flags & ATHN_FLAG_RFSILENT) &&
                    (sync & AR_INTR_SYNC_GPIO_PIN(sc->sc_rfsilent_pin))) {
+                       AR_WRITE(sc, AR_INTR_SYNC_ENABLE, 0);
+                       (void)AR_READ(sc, AR_INTR_SYNC_ENABLE);
                        pmf_event_inject(sc->sc_dev, PMFE_RADIO_OFF);
-                       return 1;
                }
 
                AR_WRITE(sc, AR_INTR_SYNC_CAUSE, sync);



Home | Main Index | Thread Index | Old Index