From 0aac8a9404d6f32fee6bf14ca9d94bcdbf035a46 Mon Sep 17 00:00:00 2001 From: dyoung Date: Thu, 23 Dec 2004 05:54:54 +0000 Subject: [PATCH] Disable interrupts and stop transmit DMA before disabling the transmitter and receiver. --- sys/dev/ic/rtw.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index e726fc193df8..d91b03bb3493 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -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 -__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 @@ rtw_kick(struct rtw_softc *sc) int pri; struct rtw_regs *regs = &sc->sc_regs; - 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_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_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,