|DDI_INTR_SET_NREQ(9F)||Kernel Functions for Drivers||DDI_INTR_SET_NREQ(9F)|
#include <sys/ddi_intr.h> int ddi_intr_set_nreq(dev_info_t *dip, int nreq);
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 maximum number of interrupts supported by the device hardware, as reported by a call to the ddi_intr_get_nintrs(9F) function. 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 ddi_intr_set_nreq()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 ddi_cb_register(9F) for an explanation on how to enable this functionality.
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
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 ddi_intr_alloc(9F) function, specifically during the driver instance's attach(9E) routine. The ddi_intr_set_nreq() 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.
|January 5, 2009||OmniOS|