Kernel Functions for Drivers csxRequestIRQ(9F)
NAME
csxRequestIRQ, csxReleaseIRQ - request or release IRQ
resource
SYNOPSIS
#include
int32t csxRequestIRQ(clienthandlet ch, irqreqt *ir);
int32t csxReleaseIRQ(clienthandlet ch, irqreqt *ir);
INTERFACE LEVEL
Solaris DI Specific (Solaris DI)
PARAMETERS
ch Client handle returned from csxRegisterClient(9F).
ir Pointer to an irqreqt structure.
DESCRIPTION
The function csxRequestIRQ() requests an IRQ resource and
registers the client's IRQ handler with Card Services.
If a client requires an IRQ,csxRequestIRQ() must be called
to request an IRQ resource as well as to register the
client's IRQ handler with Card Services. The client will not
receive callbacks at the IRQ callback handler until
csxRequestConfiguration(9F) or csxModifyConfiguration(9F)
has successfully returned when either of these functions are
called with the CONFENABLEIRQSTERING bit set.
The function csxReleaseIRQ() releases a previously
requested IRQ resource.
The Card Services IRQ resource list is adjusted by
csxReleaseIRQ(). Depending on the adapter hardware, the
host bus IRQ connection might also be disabled. Client IRQ
handlers always run above lock level and so should take care
to perform only Solaris operations that are appropriate for
an above-lock-level IRQ handler.
SunOS 5.11 Last change: 19 Jul 1996 1
Kernel Functions for Drivers csxRequestIRQ(9F)
csxRequestIRQ() fails if it has already been called without
a corresponding csxReleaseIRQ().
STRUCTURE MEMBERS
The structure members of irqreqt are:
uint32t Socket; /* socket number */
uint32t Attributes; /* IRQ attribute flags */
csfunctiont *irqhandler; /* IRQ handler */
void *irqhandlerarg; /* IRQ handler argument */
ddiiblockcookiet *iblkcookie; /* IRQ interrupt
/* block cookie */
ddiidevicecookiet *idevcookie; /* IRQ interrupt device
/* cookie */
The fields are defined as follows:
Socket Not used in Solaris, but for portability
with other Card Services implementa-
tions, it should be set to the logical
socket number.
Attributes This field is bit-mapped. It specifies
details about the type of IRQ desired by
the client. The following bits are
defined:
IRQTYPEXCLUSIVE IRQ is exclusive
to this socket.
This bit must be
set. It indicates
that the system
IRQ is dedicated
to this PC Card.
irqhandler The client IRQ callback handler entry
point is passed in the irqhandler
field.
irqhandlerarg The client can use the irqhandlerarg
field to pass client-specific data to
the client IRQ callback handler.
iblkcookie
idevcookie
SunOS 5.11 Last change: 19 Jul 1996 2
Kernel Functions for Drivers csxRequestIRQ(9F)
These fields must be used by the client
to set up mutexes that are used in the
client's IRQ callback handler.
For a specific csxReleaseIRQ() call, the values in the
irqreqt structure must be the same as those returned from
the previous csxRequestIRQ() call; otherwise, CSBADARGS
is returned and no changes are made to Card Services
resources or the socket and adapter hardware.
RETURN VALUES
CSUCES Successful operation.
CSBADARGS IRQ description does not match
allocation.
CSBADATRIBUTE IRQTYPEXCLUSIVE not set, or
an unsupported or reserved
bit is set.
CSBADHANDLE Client handle is invalid or
csxRequestConfiguration(9F) not
done.
CSBADIRQ Unable to allocate IRQ
resources.
CSINUSE csxRequestIRQ() already done or
a previous csxRequestIRQ() has
not been done for a correspond-
ing csxReleaseIRQ().
CSCONFIGURATIONLOCKED csxRequestConfiguration(9F)
already done or
csxReleaseConfiguration(9F) has
not been done.
CSNOCARD No PC Card in socket.
CSUNSUPORTEDFUNCTION No PCMCIA hardware installed.
SunOS 5.11 Last change: 19 Jul 1996 3
Kernel Functions for Drivers csxRequestIRQ(9F)
CONTEXT
These functions may be called from user or kernel context.
SEE ALSO
csxReleaseConfiguration(9F), csxRequestConfiguration(9F)
PC Card Card 95 Standard, PCMCIA/JEIDA
SunOS 5.11 Last change: 19 Jul 1996 4
|