summaryrefslogtreecommitdiffstats
path: root/sys/dev/mpt
diff options
context:
space:
mode:
authordwhite <dwhite@FreeBSD.org>2004-08-24 03:47:41 +0000
committerdwhite <dwhite@FreeBSD.org>2004-08-24 03:47:41 +0000
commitaed6d1f035cc1d507ce51e766ba99a337b229822 (patch)
treefe907ad0034a39b209e5187ac970836f4e7e7232 /sys/dev/mpt
parentdc3c5ad492c16cdbdf39a1fe60961e0543760173 (diff)
downloadFreeBSD-src-aed6d1f035cc1d507ce51e766ba99a337b229822.zip
FreeBSD-src-aed6d1f035cc1d507ce51e766ba99a337b229822.tar.gz
Pick up changes in rev 1.8 of src/sys/dev/ic/mpt_netbsd.c from NetBSD.
Set the DMA SGL length correctly if the DMA request must be chained because it is too large to fit in one SGL. This should fix this driver for some Dell Precision systems. RELENG_5 candidate. PR: kern/66479 Submitted by: HITOSHI Osada <qfh02545@nifty.com>
Diffstat (limited to 'sys/dev/mpt')
-rw-r--r--sys/dev/mpt/mpt_freebsd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/mpt/mpt_freebsd.c b/sys/dev/mpt/mpt_freebsd.c
index f64a3ff..9124ccd 100644
--- a/sys/dev/mpt/mpt_freebsd.c
+++ b/sys/dev/mpt/mpt_freebsd.c
@@ -268,11 +268,13 @@ mpt_execute_req(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
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;
OpenPOWER on IntegriCloud