 |
Index for Section 9 |
|
 |
Alphabetical listing for D |
|
 |
Bottom of page |
|
dma_get_curr_sgentry(9r)
NAME
dma_get_curr_sgentry - General: Returns a pointer to the current sg_entry
SYNOPSIS
#include <io/common/devdriver.h>
sg_entry_t dma_get_curr_sgentry(
dma_handle_t dma_handle );
ARGUMENTS
dma_handle
Specifies a handle to DMA resources associated with the mapping of an
in-memory I/O buffer onto a controller's I/O bus. This handle provides
the information to access bus address/byte count pairs. (A bus
address/byte count pair is represented by the ba and bc members of an
sg_entry structure pointer.) Device driver writers can view the DMA
handle as the tag to the allocated system resources needed to perform a
DMA operation.
DESCRIPTION
The dma_get_curr_sgentry interface returns a pointer to a bus address/byte
count pair from the in-kernel DMA mapping data structures. Unlike
dma_get_next_sgentry, a call to dma_get_curr_sgentry does not increment an
internal index variable. Thus, subsequent calls to dma_get_curr_sgentry
return the same sg_entry pointer and the same bus address/byte count pair.
NOTES
Use of the dma_get_curr_sgentry interface makes device drivers more
portable between DMA hardware-mapping implementations across different
hardware platforms because it masks out any future changes in the kernel-
and system-level DMA mapping data structures.
RETURN VALUES
On successful completion, dma_get_curr_sgentry returns a pointer to the
sg_entry structure associated with a mapped region of an I/O buffer on the
controller's I/O bus. This sg_entry pointer is associated with the current
bus address/byte count pair for this DMA handle. Otherwise,
dma_get_curr_sgentry returns the value 0 (zero) to indicate that it has
reached the end of the bus address/byte count pairs for this DMA handle.
SEE ALSO
Data Structures: sg_entry(9s)
Kernel Interfaces: dma_get_next_sgentry(9r)
 |
Index for Section 9 |
|
 |
Alphabetical listing for D |
|
 |
Top of page |
|