dma_sgio(D3DK) — MISC. REFERENCE MANUAL PAGES
.IX \f4dma_sgio\fP(D3DK)
NAME
dma_sgio − break up an I/O request for controller that does scatter/gather
SYNOPSIS
#include <sys/buf.h> void dma_sgio(int (∗strat)(), struct buf ∗bp);
ARGUMENTS
stratpointer to the strategy(D2DK) routine to call to complete the I/O transfer
bppointer to the buf structure
DESCRIPTION
dma_sgio is used for physical I/O when the driver supports scatter/gather but the user transfer cannot be handled directly by the controller because of alignment problems.
dma_sgio allocates all the kernel virtual memory needed for the transaction (aligned on a page boundary), initiates the transaction, and copies the data to the user address space. If there is a limit to the number of blocks that can be DMAed by the controller, and the size of the read/write requests exceeds the limit, then the driver must invoke dma_sgio iteratively, without exceeding the maximum limit on each iteration, until the read/write request is satisfied.
If the user address is aligned suitably, the driver should initiate a DMA transaction directly to the user address by calling the strategy routine.
This routine is provided specifically for device driver support on the M68000 or M88000 family of processors.
RETURN VALUES
None.
LEVEL
Base only
SEE ALSO
dma_pageio(D3DK)
— DDI