bp_iosetup(D3DK) —
.IX \f4bp_iosetup\fP(D3DK)
NAME
bp_iosetup − create scatter/gather list for block drivers
SYNOPSIS
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/iosystm.h>
int bp_iosetup(struct buf ∗bp, struct iolist ∗list, int size,
int maxcoalesce);
ARGUMENTS
∗bppointer to the buffer header structure
∗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
bp_iosetup is invoked from block 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 or page list and count in the buffer header. This routine ensures that the data cache has been invalidated or synced for all pages involved in the DMA transfer. bp_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
mp_iosetup(D3DK), buf(D4DK)
DDI/DKI