1ddi_dma_coff(9F) Kernel Functions for Drivers ddi_dma_coff(9F)
2
3
4
6 ddi_dma_coff - convert a DMA cookie to an offset within a DMA handle.
7
9 #include <sys/conf.h>
10 #include <sys/ddi.h>
11 #include <sys/sunddi.h>
12
13
14
15 int ddi_dma_coff(ddi_dma_handle_t handle, ddi_dma_cookie_t *cookiep,
16 off_t *offp);
17
18
20 Solaris SPARC DDI (Solaris SPARC DDI). This interface is obsolete.
21
23 handle The handle filled in by a call to ddi_dma_setup(9F).
24
25
26 cookiep A pointer to a DMA cookie (see ddi_dma_cookie(9S)) that con‐
27 tains the appropriate address, length and bus type to be
28 used in programming the DMA engine.
29
30
31 offp A pointer to an offset to be filled in.
32
33
35 The ddi_dma_coff() function converts the values in DMA cookie pointed
36 to by cookiep to an offset (in bytes) from the beginning of the object
37 that the DMAhandle has mapped.
38
39
40 The ddi_dma_coff() function allows a driver to update a DMA cookie with
41 values it reads from its device's DMA engine after a transfer completes
42 and convert that value into an offset into the object that is mapped
43 for DMA.
44
46 The ddi_dma_coff() function returns:
47
48 DDI_SUCCESS Successfully filled in offp.
49
50
51 DDI_FAILURE Failed to successfully fill in offp.
52
53
55 The ddi_dma_coff() function can be called from user, interrupt, or ker‐
56 nel context.
57
59 See attributes(5) for descriptions of the following attributes:
60
61
62
63
64 ┌─────────────────────────────┬─────────────────────────────┐
65 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
66 ├─────────────────────────────┼─────────────────────────────┤
67 │Interface Stability │Obsolete │
68 └─────────────────────────────┴─────────────────────────────┘
69
71 ddi_dma_setup(9F), ddi_dma_sync(9F), ddi_dma_cookie(9S)
72
73
74 Writing Device Drivers
75
76
77
78SunOS 5.11 16 Jan 2006 ddi_dma_coff(9F)