Kernel Functions for Drivers ddiintrsetnreq(9F)
NAME
ddiintrsetnreq - set the number of interrupts requested
for a device driver instance
SYNOPSIS
#include
int ddiintrsetnreq(devinfot *dip, int nreq);
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
PARAMETERS
dip Pointer to the devinfo structure.
nreq Number of interrupts requested.
DESCRIPTION
The ddiintrsetnreq() function changes the number of
interrupts requested by a device driver instance.
The nreq parameter is the total number of interrupt
resources that this instance of the device driver would like
to have available. The nreq parameter includes any interrupt
resources already allocated by the driver. For example, if
the driver instance already has two MSI-X vectors and it
wants two more, it should call this function with an nreq
parameter set to four.
The nreq parameter can be any value between one and the max-
imum number of interrupts supported by the device hardware,
as reported by a call to the ddiintrgetnintrs(9F) func-
tion. The driver receives a callback notifying it in cases
when it must release any previously allocated interrupts, or
when it is allowed to allocate more interrupts as a result
of its new nreq parameter.
The ddiintrsetnreq()function is not supported unless a
driver is already consuming interrupts, and if it has a
registered callback handler that can process actions related
to changes in interrupt availability. See
ddicbregister(9F) for an explanation on how to enable this
functionality.
SunOS 5.11 Last change: 5 Jan 2009 1
Kernel Functions for Drivers ddiintrsetnreq(9F)
RETURN VALUES
The ddiintrsetnreq() function returns:
DISUCES on success
DIEINVAL The operation is invalid because the nreq
parameter is not a legal value
DIENOTSUP The operation is not supported. The driver
must have a registered callback, and the sys-
tem must have interrupt pools implemented.
DIFAILURE Implementation specific failure
CONTEXT
These functions can be called from kernel, non-interrupt
context.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Private
MT-Level MT-Safe
SEE ALSO
attributes(5), attach(9E), ddicbregister(9F),
ddiintralloc(9F), ddiintrgetnintrs(9F)
NOTES
The Interrupt Resource Management feature is limited to dev-
ice driver instances that are using MSI-X interrupts (inter-
rupt type DINTRTYPEMSIX). Attempts to use this function
for any other type of interrupts fails with DIENOTSUP.
The total number of interrupts requested by the driver is
initially defined by the count parameter provided by the
driver's first call to the ddiintralloc(9F) function,
specifically during the driver instance's attach(9E)
SunOS 5.11 Last change: 5 Jan 2009 2
Kernel Functions for Drivers ddiintrsetnreq(9F)
routine. The ddiintrsetnreq() function is only used if
the driver instance experiences changes in its I/O load. In
response to increased I/O load, the driver may want to
request additional interrupt resources. In response to
diminished I/O load. the driver may volunteer to return
extra interrupt resources back to the system.
SunOS 5.11 Last change: 5 Jan 2009 3
|