From a6d8e45ba740a1274380b07f77cb9c685ff006c7 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sun, 21 May 2000 13:00:46 +0000 Subject: [PATCH] Call bus_dmamap_unload() if any Tx mbuf remains in rtk_stop(). --- sys/dev/ic/rtl81x9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index 2b4d0a98624d..91f6ffc7297e 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtl81x9.c,v 1.10 2000/05/19 13:42:29 tsutsui Exp $ */ +/* $NetBSD: rtl81x9.c,v 1.11 2000/05/21 13:00:46 tsutsui Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1643,6 +1643,7 @@ STATIC void rtk_stop(sc) */ for (i = 0; i < RTK_TX_LIST_CNT; i++) { if (sc->rtk_cdata.rtk_tx_chain[i] != NULL) { + bus_dmamap_unload(sc->sc_dmat, sc->snd_dmamap[i]); m_freem(sc->rtk_cdata.rtk_tx_chain[i]); sc->rtk_cdata.rtk_tx_chain[i] = NULL; CSR_WRITE_4(sc, RTK_TXADDR0 + i, 0x0000000);