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

NAME

6       csx_RequestIRQ, csx_ReleaseIRQ - request or release IRQ resource
7

SYNOPSIS

9       #include <sys/pccard.h>
10
11
12
13       int32_t csx_RequestIRQ(client_handle_t ch, irq_req_t *ir);
14
15
16       int32_t csx_ReleaseIRQ(client_handle_t ch, irq_req_t *ir);
17
18

INTERFACE LEVEL

20       Solaris DDI Specific (Solaris DDI)
21

PARAMETERS

23       ch     Client handle returned from csx_RegisterClient(9F).
24
25
26       ir     Pointer to an irq_req_t structure.
27
28

DESCRIPTION

30       The  function  csx_RequestIRQ()  requests an IRQ resource and registers
31       the client's IRQ handler with Card Services.
32
33
34       If a client requires an IRQ,csx_RequestIRQ() must be called to  request
35       an  IRQ  resource  as well as to register the client's IRQ handler with
36       Card Services. The client will not receive callbacks at the  IRQ  call‐
37       back handler until csx_RequestConfiguration(9F) or csx_ModifyConfigura‐
38       tion(9F) has successfully returned when either of these  functions  are
39       called with the CONF_ENABLE_IRQ_STEERING bit set.
40
41
42       The  function  csx_ReleaseIRQ()  releases  a  previously  requested IRQ
43       resource.
44
45
46       The Card Services IRQ resource list is  adjusted  by  csx_ReleaseIRQ().
47       Depending  on  the  adapter hardware, the host bus IRQ connection might
48       also be disabled. Client IRQ handlers always run above lock  level  and
49       so  should take care to perform only Solaris operations that are appro‐
50       priate for an above-lock-level IRQ handler.
51
52
53       csx_RequestIRQ() fails if it has already been called without  a  corre‐
54       sponding csx_ReleaseIRQ().
55

STRUCTURE MEMBERS

57       The structure members of irq_req_t are:
58
59         uint32_t                Socket;          /* socket number */
60         uint32_t                Attributes;      /* IRQ attribute flags */
61         csfunction_t            *irq_handler;    /* IRQ handler */
62         void                    *irq_handler_arg; /* IRQ handler argument */
63         ddi_iblock_cookie_t     *iblk_cookie;    /* IRQ interrupt
64                                                  /*   block cookie */
65         ddi_idevice_cookie_t    *idev_cookie;    /* IRQ interrupt device
66                                                  /*   cookie */
67
68
69
70       The fields are defined as follows:
71
72       Socket              Not used in Solaris, but for portability with other
73                           Card Services implementations, it should be set  to
74                           the logical socket number.
75
76
77       Attributes          This  field  is  bit-mapped.  It  specifies details
78                           about the type of IRQ desired by  the  client.  The
79                           following bits are defined:
80
81                           IRQ_TYPE_EXCLUSIVE    IRQ   is  exclusive  to  this
82                                                 socket. This bit must be set.
83                                                 It  indicates that the system
84                                                 IRQ is dedicated to  this  PC
85                                                 Card.
86
87
88
89       irq_handler         The  client  IRQ  callback  handler  entry point is
90                           passed in the irq_handler field.
91
92
93       irq_handler_arg     The client can use  the  irq_handler_arg  field  to
94                           pass  client-specific  data to the client IRQ call‐
95                           back handler.
96
97
98       iblk_cookie         These fields must be used by the client to  set  up
99       idev_cookie         mutexes  that are used in the client's IRQ callback
100                           handler.
101
102
103
104       For a specific csx_ReleaseIRQ()  call,  the  values  in  the  irq_req_t
105       structure  must  be  the  same  as  those  returned  from  the previous
106       csx_RequestIRQ()  call;  otherwise,  CS_BAD_ARGS  is  returned  and  no
107       changes  are  made to Card Services resources or the socket and adapter
108       hardware.
109

RETURN VALUES

111       CS_SUCCESS                  Successful operation.
112
113
114       CS_BAD_ARGS                 IRQ description does not match allocation.
115
116
117       CS_BAD_ATTRIBUTE            IRQ_TYPE_EXCLUSIVE not set,  or  an  unsup‐
118                                   ported or reserved         bit is set.
119
120
121       CS_BAD_HANDLE               Client handle is invalid or csx_RequestCon‐
122                                   figuration(9F) not done.
123
124
125       CS_BAD_IRQ                  Unable to allocate IRQ resources.
126
127
128       CS_IN_USE                   csx_RequestIRQ() already done or a previous
129                                   csx_RequestIRQ()  has  not  been done for a
130                                   corresponding csx_ReleaseIRQ().
131
132
133       CS_CONFIGURATION_LOCKED     csx_RequestConfiguration(9F)  already  done
134                                   or   csx_ReleaseConfiguration(9F)  has  not
135                                   been done.
136
137
138       CS_NO_CARD                  No PC Card in socket.
139
140
141       CS_UNSUPPORTED_FUNCTION     No PCMCIA hardware installed.
142
143

CONTEXT

145       These functions may be called from user or kernel context.
146

SEE ALSO

148       csx_ReleaseConfiguration(9F), csx_RequestConfiguration(9F)
149
150
151       PC Card Card 95 Standard, PCMCIA/JEIDA
152
153
154
155SunOS 5.11                        19 Jul 1996               csx_RequestIRQ(9F)
Impressum