#ident "@(#)ddi_intr_set_nreq.9f 1.1 08/09/30 SMI" Kernel Functions for Device Drivers ddi_intr_set_nreq(9F) NAME ddi_intr_set_nreq - set the number of interrupts requested for a device driver instance SYNOPSIS #include int ddi_intr_set_nreq(dev_info_t *dip, int nreq); INTERFACE LEVEL Solaris DDI specific (Solaris DDI). PARAMETERS dip Pointer to the dev_info structure nreq Number of interrupts requested. DESCRIPTION The ddi_intr_set_nreq() function changes the number of interrupts requested by a device driver. The nreq parameter is initially set to be equal to the count parameter when the device driver first calls the ddi_intr_alloc(9F) function. If the device driver detects changes in its workload, and it decides it needs more or less interrupt vectors, then it may use the ddi_intr_set_nreq() function to adjust its nreq parameter at arbitrary times. The nreq parameter can be any value between 1 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 will receive 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. RETURN VALUES The ddi_intr_set_nreq() function returns: DDI_SUCCESS On success. DDI_EINVAL The operation is invalid because the nreq parameter is not a legal value. DDI_ENOTSUP The operation is not supported. The driver must have a registered callback, and the system must have interrupt pools implemented. DDI_FAILURE On any implementation specific failure. ATTRIBUTES See attributes(5) for descriptions of the following attributes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |___________________________|________________________________| | Interface Stability | Committed | |___________________________|________________________________| | MT-Level | MT-Safe | |___________________________|________________________________| SEE ALSO attributes(5), ddi_intr_alloc(9F), ddi_intr_get_nintrs(9F), ddi_cb_register(9F)