summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2004-08-12 18:10:12 +0000
committerjason <jason@openbsd.org>2004-08-12 18:10:12 +0000
commitf0acb28cea2e090be5d298f2059c194e694dda7e (patch)
tree01a99f6666c5383b49910b8aaef3042e340c99fb
parentUse cvs_files to build the file hierarchy and handle explicit arguments (diff)
downloadwireguard-openbsd-f0acb28cea2e090be5d298f2059c194e694dda7e.tar.xz
wireguard-openbsd-f0acb28cea2e090be5d298f2059c194e694dda7e.zip
Leave the command wait interrupt enabled as long as there is at least one
pending result. This isn't a good solution (we're obviously missing an interrupt or two in some cases), but this will guarantee we get called periodically until all of the queues are drained. Based on idea from "jochen from penguin-breeder decimal org"; ok theo
-rw-r--r--sys/dev/pci/hifn7751.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c
index 4732c93f4c1..ba234829919 100644
--- a/sys/dev/pci/hifn7751.c
+++ b/sys/dev/pci/hifn7751.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hifn7751.c,v 1.148 2004/03/14 23:26:11 hshoexer Exp $ */
+/* $OpenBSD: hifn7751.c,v 1.149 2004/08/12 18:10:12 jason Exp $ */
/*
* Invertex AEON / Hifn 7751 driver
@@ -1565,10 +1565,8 @@ hifn_crypto(struct hifn_softc *sc, struct hifn_command *cmd,
* interrupt salvages us from), unless there is more than one command
* in the queue.
*/
- if (dma->cmdu > 1) {
- sc->sc_dmaier |= HIFN_DMAIER_C_WAIT;
- WRITE_REG_1(sc, HIFN_1_DMA_IER, sc->sc_dmaier);
- }
+ sc->sc_dmaier |= HIFN_DMAIER_C_WAIT;
+ WRITE_REG_1(sc, HIFN_1_DMA_IER, sc->sc_dmaier);
hifnstats.hst_ipackets++;
hifnstats.hst_ibytes += cmd->src_map->dm_mapsize;
@@ -2568,10 +2566,8 @@ hifn_compress_enter(struct hifn_softc *sc, struct hifn_command *cmd)
* interrupt salvages us from), unless there is more than one command
* in the queue.
*/
- if (dma->cmdu > 1) {
- sc->sc_dmaier |= HIFN_DMAIER_C_WAIT;
- WRITE_REG_1(sc, HIFN_1_DMA_IER, sc->sc_dmaier);
- }
+ sc->sc_dmaier |= HIFN_DMAIER_C_WAIT;
+ WRITE_REG_1(sc, HIFN_1_DMA_IER, sc->sc_dmaier);
hifnstats.hst_ipackets++;
hifnstats.hst_ibytes += cmd->src_map->dm_mapsize;