From 253096d2c4af92bcd795d46a882a8f764d9f081b Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 14 Jun 2001 23:51:59 +0000 Subject: dst ring corruption fix; jason --- sys/dev/pci/hifn7751.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c index e8bd3575d12..e6e68cc2f42 100644 --- a/sys/dev/pci/hifn7751.c +++ b/sys/dev/pci/hifn7751.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hifn7751.c,v 1.67 2001/06/14 23:51:18 deraadt Exp $ */ +/* $OpenBSD: hifn7751.c,v 1.68 2001/06/14 23:51:58 deraadt Exp $ */ /* * Invertex AEON / Hi/fn 7751 driver @@ -1529,6 +1529,10 @@ hifn_callback(sc, cmd, macbuf) dma->dstk = 0; dma->dstu--; } + } else if (crp->crp_flags & CRYPTO_F_IOV) { + hifnstats.hst_obytes += cmd->dst_map->dm_mapsize; + dma->dstk = (dma->dstk + cmd->dst_map->dm_nsegs) % HIFN_D_DST_RSIZE; + dma->dstu -= cmd->dst_map->dm_nsegs; } if ((cmd->base_masks & (HIFN_BASE_CMD_CRYPT | HIFN_BASE_CMD_DECODE)) == -- cgit v1.2.3