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 and stop transmit DMA before d...



details:   https://anonhg.NetBSD.org/src/rev/c9f976777586
branches:  trunk
changeset: 572187:c9f976777586
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Thu Dec 23 05:54:54 2004 +0000

description:
Disable interrupts and stop transmit DMA before disabling the
transmitter and receiver.

diffstat:

 sys/dev/ic/rtw.c |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 8584bdd59a97 -r c9f976777586 sys/dev/ic/rtw.c
--- a/sys/dev/ic/rtw.c  Thu Dec 23 05:52:27 2004 +0000
+++ b/sys/dev/ic/rtw.c  Thu Dec 23 05:54:54 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtw.c,v 1.14 2004/12/23 05:52:27 dyoung Exp $ */
+/* $NetBSD: rtw.c,v 1.15 2004/12/23 05:54:54 dyoung Exp $ */
 /*-
  * Copyright (c) 2004, 2005 David Young.  All rights reserved.
  *
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.14 2004/12/23 05:52:27 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.15 2004/12/23 05:54:54 dyoung Exp $");
 
 #include "bpfilter.h"
 
@@ -1540,9 +1540,16 @@
        int pri;
        struct rtw_regs *regs = &sc->sc_regs;
 
+       RTW_WRITE16(regs, RTW_IMR, 0);
+       RTW_WBW(regs, RTW_IMR, RTW_TPPOLL);
+
+       RTW_WRITE8(regs, RTW_TPPOLL,
+           RTW_TPPOLL_SBQ|RTW_TPPOLL_SHPQ|RTW_TPPOLL_SNPQ|RTW_TPPOLL_SLPQ);
+
+       RTW_SYNC(regs, RTW_TPPOLL, RTW_TPPOLL);
+
        rtw_io_enable(regs, RTW_CR_RE | RTW_CR_TE, 0);
-       RTW_WRITE16(regs, RTW_IMR, 0);
-       RTW_SYNC(regs, RTW_IMR, RTW_IMR);
+
        rtw_rxbufs_release(sc->sc_dmat, &sc->sc_rxctl[0]);
        for (pri = 0; pri < RTW_NTXPRI; pri++) {
                rtw_txbufs_release(sc->sc_dmat, &sc->sc_ic,



Home | Main Index | Thread Index | Old Index