summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2000-11-10 04:24:50 +0000
committerkrw <krw@openbsd.org>2000-11-10 04:24:50 +0000
commitafb09107aa3b491dc72542a6e74f56525a263799 (patch)
tree817612489bb483b4473b9a5da00df70209f733d7
parentdo not change NROFF (diff)
downloadwireguard-openbsd-afb09107aa3b491dc72542a6e74f56525a263799.tar.xz
wireguard-openbsd-afb09107aa3b491dc72542a6e74f56525a263799.zip
This fixes a problem that caused DMA errors from shortly before
2.7 through the released 2.8. As NetBSD describes the problem: DMA failure still arise when AdvanSys U[2]W host adapters are used in conjunction with Intel 82443BX Host Bridge/Controller (rev. 0x03). With a correct sg_cnt, scatter/gather lists with >1 element no longer reference random(?) memory. Now the mystery is why this didn't cause more problems on other chipsets. Installs of 2.7 and 2.8 to a drive on an adw bus now work even if the motherboard uses the 82443BX. So many problems from one character ...
-rw-r--r--sys/dev/ic/adw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c
index 1d4b35b7a31..03415f3c224 100644
--- a/sys/dev/ic/adw.c
+++ b/sys/dev/ic/adw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw.c,v 1.10 2000/10/15 12:22:15 krw Exp $ */
+/* $OpenBSD: adw.c,v 1.11 2000/11/10 04:24:50 krw Exp $ */
/* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */
/*
@@ -913,7 +913,7 @@ adw_build_sglist(ccb, scsiqp, sg_block)
if (--sg_elem_cnt == 0) {
/* last entry, get out */
- sg_block->sg_cnt = i + i;
+ sg_block->sg_cnt = i + 1;
sg_block->sg_ptr = NULL; /* next link = NULL */
return;
}