1ddi_dma_buf_setup(9F)    Kernel Functions for Drivers    ddi_dma_buf_setup(9F)
2
3
4

NAME

6       ddi_dma_buf_setup - easier DMA setup for use with buffer structures
7

SYNOPSIS

9       #include <sys/ddi.h>
10       #include <sys/sunddi.h>
11
12
13
14       int ddi_dma_buf_setup(dev_info_t *dip, struct buf *bp, uint_t flags,
15            int (*waitfp) (caddr_t),, caddr_t arg, ddi_dma_lim_t *lim,
16            ddi_dma_handle_t *handlep);
17
18

INTERFACE LEVEL

20       This  interface is obsolete. ddi_dma_buf_bind_handle(9F) should be used
21       instead.
22

PARAMETERS

24       dip        A pointer to the device's dev_info structure.
25
26
27       bp         A pointer to a system buffer structure (see buf(9S)).
28
29
30       flags      Flags  that   go   into   a   ddi_dma_req   structure   (see
31                  ddi_dma_req(9S)).
32
33
34       waitfp     The  address  of  a function to call back later if resources
35                  aren't  available  now.  The  special   function   addresses
36                  DDI_DMA_SLEEP and DDI_DMA_DONTWAIT (see ddi_dma_req(9S)) are
37                  taken to mean, respectively, wait until resources are avail‐
38                  able, or do not wait at all and do not schedule a callback.
39
40
41       arg        Argument  to  be  passed  to  a callback function, if such a
42                  function is specified.
43
44
45       lim        A pointer to a DMA limits structure  for  this  device  (see
46                  ddi_dma_lim_sparc(9S)   or   ddi_dma_lim_x86(9S)).  If  this
47                  pointer is NULL, a default set of DMA limits is assumed.
48
49
50       handlep    Pointer to a DMA handle. See ddi_dma_setup(9F) for a discus‐
51                  sion of handle.
52
53

DESCRIPTION

55       The  ddi_dma_buf_setup() function is an interface to ddi_dma_setup(9F).
56       It uses its arguments to construct an appropriate ddi_dma_req structure
57       and calls ddi_dma_setup() with it.
58

RETURN VALUES

60       See ddi_dma_setup(9F) for the possible return values for this function.
61

CONTEXT

63       The ddi_dma_buf_setup() function can be called from user, interrupt, or
64       kernel context, except when waitfp is set to  DDI_DMA_SLEEP,  in  which
65       case it cannot be called from interrupt context.
66

ATTRIBUTES

68       See attributes(5) for a description of the following attributes:
69
70
71
72
73       ┌─────────────────────────────┬─────────────────────────────┐
74ATTRIBUTE TYPE         ATTRIBUTE VALUE        
75       ├─────────────────────────────┼─────────────────────────────┤
76       │Stability Level              │Obsolete                     │
77       └─────────────────────────────┴─────────────────────────────┘
78

SEE ALSO

80       attributes(5),         ddi_dma_addr_setup(9F),        ddi_dma_free(9F),
81       ddi_dma_htoc(9F),  ddi_dma_setup(9F),   ddi_dma_sync(9F),   physio(9F),
82       buf(9S), ddi_dma_lim_sparc(9S), ddi_dma_lim_x86(9S), ddi_dma_req(9S)
83
84
85       Writing Device Drivers
86
87
88
89SunOS 5.11                        16 Jan 2006            ddi_dma_buf_setup(9F)
Impressum