mp_iosetup(D3DK) —
.IX \f4mp_iosetup\fP(D3DK)
NAME
mp_iosetup − create scatter/gather list for STREAMS drivers
SYNOPSIS
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/iosystm.h>
int mp_iosetup(struct mblk ∗mp, int isread,
struct iolist ∗list, int size int maxcoalesce);
ARGUMENTS
∗mppointer to a STREAMS message structure
isreadspecifies if the I/O to be performed with the resultant scatter/gather list is a read operation (DMA from the controller to host memory)
∗listpointer to the scatter/gather list
sizethe number of I/O vectors in list
maxcoalescethe maximum coalescing size the controller can handle per scatter/gather entry
DESCRIPTION
mp_iosetup is invoked from STREAMS driver strategy routines. It returns a count of at most size (physical address, length) I/O vectors which are returned in list, and can then be passed to a controller. The I/O vectors are computed from the virtual address in the STREAMS message. This routine ensures that the data cache has been invalidated or synced for all page(s) involved in the DMA transfer. mp_iosetup fails with a return value of −1 if list becomes larger than size.
This routine is provided specifically for device driver support on the M68000 or M88000 family of processors.
RETURN VALUES
The number of entries in list.
LEVEL
Base
SEE ALSO
bp_iosetup(D3DK), msgb(D4DK)
DDI/DKI