summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2001-05-10 00:44:33 +0000
committerjason <jason@openbsd.org>2001-05-10 00:44:33 +0000
commit2b2f9fb43af684ec92094838a02a9b9b62430267 (patch)
tree2e82d6251640a123be39a0c76a513de875f603a1
parentfix prototype; J.S.Peatfield@damtp.cam.ac.uk (diff)
downloadwireguard-openbsd-2b2f9fb43af684ec92094838a02a9b9b62430267.tar.xz
wireguard-openbsd-2b2f9fb43af684ec92094838a02a9b9b62430267.zip
in txp_intr() only refill the rx buffer ring if it is empty; based on
suggestion from Pankaj Chhabra.
-rw-r--r--sys/dev/pci/if_txp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c
index 82ba5503897..3a49c01d28c 100644
--- a/sys/dev/pci/if_txp.c
+++ b/sys/dev/pci/if_txp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_txp.c,v 1.26 2001/05/09 02:25:08 jason Exp $ */
+/* $OpenBSD: if_txp.c,v 1.27 2001/05/10 00:44:33 jason Exp $ */
/*
* Copyright (c) 2001
@@ -536,6 +536,7 @@ txp_intr(vsc)
void *vsc;
{
struct txp_softc *sc = vsc;
+ struct txp_hostvar *hv = sc->sc_hostvar;
u_int32_t isr;
int claimed = 0;
@@ -556,7 +557,8 @@ txp_intr(vsc)
if ((*sc->sc_rxlor.r_roff) != (*sc->sc_rxlor.r_woff))
txp_rx_reclaim(sc, &sc->sc_rxlor);
- txp_rxbuf_reclaim(sc);
+ if (hv->hv_rx_buf_write_idx == hv->hv_rx_buf_read_idx)
+ txp_rxbuf_reclaim(sc);
if (sc->sc_txhir.r_cnt && (sc->sc_txhir.r_cons !=
TXP_OFFSET2IDX(*(sc->sc_txhir.r_off))))