1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

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>
This commit is contained in:
Doug White 2004-08-24 03:47:41 +00:00
parent 648bfe0b75
commit b3f1e85ab9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134235

View File

@ -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;