From b3f1e85ab9b712355c26f5f2a188a44444e5c85c Mon Sep 17 00:00:00 2001 From: Doug White Date: Tue, 24 Aug 2004 03:47:41 +0000 Subject: [PATCH] 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 --- sys/dev/mpt/mpt_freebsd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/mpt/mpt_freebsd.c b/sys/dev/mpt/mpt_freebsd.c index f64a3ff6b7d1..9124ccdaae0e 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;