summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-04-21 14:48:25 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-04-21 14:48:25 +0000
commita1c46bf132cdbcbb027dd7577ebbc2169f0f8a37 (patch)
tree17ec667b31b59e4cb92887fdcac424e29a9b6264 /sys/dev
parenta15fc989cfe3d7cf86bba16f3e21366e81ecc4cb (diff)
fill the rx free fifo on interface up, and drain it on interface down.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_tht.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c
index 0e6b388edf8..698143637e5 100644
--- a/sys/dev/pci/if_tht.c
+++ b/sys/dev/pci/if_tht.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tht.c,v 1.44 2007/04/21 14:46:35 dlg Exp $ */
+/* $OpenBSD: if_tht.c,v 1.45 2007/04/21 14:48:24 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -744,6 +744,7 @@ tht_up(struct tht_softc *sc)
goto free_rxd;
/* populate rxf fifo */
+ tht_rxf_fill(sc, 1);
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
@@ -791,6 +792,7 @@ tht_down(struct tht_softc *sc)
tht_fifo_free(sc, &sc->sc_txt);
/* free mbufs that were on the rxf fifo */
+ tht_rxf_drain(sc);
tht_pkt_free(sc, &sc->sc_rx_list);
tht_pkt_free(sc, &sc->sc_tx_list);