Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ddi_dma_nextseg(9F) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ddi_dma_addr_setup(9F)

ddi_dma_buf_setup(9F)

ddi_dma_nextwin(9F)

ddi_dma_segtocookie(9F)

ddi_dma_sync(9F)

ddi_dma_req(9S)

ddi_dma_nextseg(9F)

NAME

ddi_dma_nextseg − get next DMA segment

SYNOPSIS

#include <sys/ddi.h>
#include <sys/sunddi.h>
int ddi_dma_nextseg(ddi_dma_win_t win, ddi_dma_seg_t seg,0
ddi_dma_seg_t ∗nseg);

ARGUMENTS

win A DMA window. 

seg The current DMA segment or NULL .

nseg A pointer to the next DMA segment to be filled in. If seg is NULL , a pointer to the first segment within the specified window is returned.

INTERFACE LEVEL

Solaris architecture specific (SunDDI). 

DESCRIPTION

ddi_dma_nextseg() gets the next DMA segment within the specified window win.  If the current segment is NULL , the first DMA segment within the window is returned. 

A DMA segment is always required for a DMA window.  A DMA segment is a contiguous portion of a DMA window (see ddi_dma_nextwin(9F)) which is entirely addressable by the device for a data transfer operation. 

An example where multiple DMA segments are allocated is where the system does not contain DVMA capabilities and the object may be non-contiguous.  In this example the object will be broken into smaller contiguous segments.  Another example is where the device has some upper limit on its transfer size (for example an 8-bit address register) and has expressed this in the ddi_dma_lim(9S) structure. In this example the object will be broken into smaller addressable segments. 

RETURN VALUES

ddi_dma_nextseg() returns:

DDI_SUCCESS Successfully filled in the next segment pointer. 

DDI_DMA_DONE There is no next segment. The current segment is the final segment within the specified ­window. 

DDI_DMA_STALE win does not refer to the currently active ­window. 

CONTEXT

ddi_dma_nextseg() can be called from user or interrupt context.

EXAMPLE

For an example see ddi_dma_segtocookie(9F). 

SEE ALSO

ddi_dma_addr_setup(9F), ddi_dma_buf_setup(9F), ddi_dma_nextwin(9F), ddi_dma_segtocookie(9F), ddi_dma_sync(9F), ddi_dma_req(9S)

SunOS 5.1 Writing Device Drivers

SunOS 5.1  —  Last change: 22 January 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026