summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2004-04-12 13:24:28 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2004-04-12 13:24:28 +0000
commit96b0e198b9a84ebd8c529fc8d3ea591a838c85f4 (patch)
tree65fffbcd33c093aa580d796735e334d725ceebb5 /sys
parentce2e6c1aec00855c97b41c1488c1f7e2cedfb7c0 (diff)
Fix DMA length on complex SGL. Apparantly this fixes the outstanding 1.03.xx mpt firmware issue. From NetBSD pointed out by deraadt@. ok deraadt@, krw@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/mpt_openbsd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/ic/mpt_openbsd.c b/sys/dev/ic/mpt_openbsd.c
index 6c148bfa661..08f4ab57a31 100644
--- a/sys/dev/ic/mpt_openbsd.c
+++ b/sys/dev/ic/mpt_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpt_openbsd.c,v 1.8 2004/04/11 12:56:05 marco Exp $ */
+/* $OpenBSD: mpt_openbsd.c,v 1.9 2004/04/12 13:24:27 marco Exp $ */
/* $NetBSD: mpt_netbsd.c,v 1.7 2003/07/14 15:47:11 lukem Exp $ */
/*
@@ -1138,11 +1138,14 @@ mpt_run_xfer(mpt_softc_t *mpt, struct scsi_xfer *xs)
ntodo = MPT_NSGL(mpt) - 1;
ce->NextChainOffset = (MPT_RQSL(mpt) -
sizeof(SGE_SIMPLE32)) >> 2;
+ ce->Length = MPT_NSGL(mpt)
+ * sizeof(SGE_SIMPLE32);
} else {
ntodo = nleft;
ce->NextChainOffset = 0;
+ ce->Length = ntodo
+ * sizeof(SGE_SIMPLE32);
}
- ce->Length = ntodo * sizeof(SGE_SIMPLE32);
ce->Address = req->req_pbuf +
((char *)se - (char *)mpt_req);
ce->Flags = MPI_SGE_FLAGS_CHAIN_ELEMENT;