Skip Navigation Links | |
Exit Print View | |
![]() |
man pages section 9: DDI and DKI Kernel Functions Oracle Solaris 10 8/11 Information Library |
csx_AccessConfigurationRegister(9F)
csx_Parse_CISTPL_BYTEORDER(9F)
csx_Parse_CISTPL_CFTABLE_ENTRY(9F)
csx_Parse_CISTPL_DEVICEGEO(9F)
csx_Parse_CISTPL_DEVICEGEO_A(9F)
csx_Parse_CISTPL_DEVICE_OA(9F)
csx_Parse_CISTPL_DEVICE_OC(9F)
csx_Parse_CISTPL_LINKTARGET(9F)
csx_Parse_CISTPL_LONGLINK_A(9F)
csx_Parse_CISTPL_LONGLINK_C(9F)
csx_Parse_CISTPL_LONGLINK_MFC(9F)
ddi_get_soft_iblock_cookie(9F)
ddi_intr_get_supported_types(9F)
ddi_prop_lookup_byte_array(9F)
ddi_prop_lookup_int64_array(9F)
ddi_prop_lookup_string_array(9F)
ddi_prop_update_byte_array(9F)
ddi_prop_update_int64_array(9F)
ddi_prop_update_string_array(9F)
ldi_prop_lookup_byte_array(9F)
ldi_prop_lookup_int64_array(9F)
ldi_prop_lookup_string_array(9F)
mac_prop_info_set_default_link_flowctrl(9F)
mac_prop_info_set_default_str(9F)
mac_prop_info_set_default_uint8(9F)
mac_prop_info_set_range_uint32(9F)
net_event_notify_unregister(9F)
net_instance_notify_register(9F)
net_instance_notify_unregister(9F)
net_instance_protocol_unregister(9F)
net_protocol_notify_register(9F)
nvlist_lookup_boolean_array(9F)
nvlist_lookup_boolean_value(9F)
nvlist_lookup_nvlist_array(9F)
nvlist_lookup_string_array(9F)
nvlist_lookup_uint16_array(9F)
nvlist_lookup_uint32_array(9F)
nvlist_lookup_uint64_array(9F)
nvpair_value_boolean_array(9F)
scsi_get_device_type_scsi_options(9F)
scsi_sense_cmdspecific_uint64(9F)
usb_get_current_frame_number(9F)
usb_get_max_pkts_per_isoc_request(9F)
usb_pipe_get_max_bulk_transfer_size(9F)
usb_pipe_stop_intr_polling(9F)
usb_pipe_stop_isoc_polling(9F)
- enable or disable a given interrupt or range of interrupts
#include <sys/types.h> #include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> int ddi_intr_enable(ddi_intr_handle_t h);
int ddi_intr_block_enable(ddi_intr_handle_t *h_array, int count);
int ddi_intr_disable(ddi_intr_handle_t h);
int ddi_intr_block_disable(ddi_intr_handle_t *h_array, int count);
Solaris DDI specific (Solaris DDI).
ddi_intr_enable()
DDI interrupt handle
ddi_intr_block_enable()
Pointer to an array of DDI interrupt handles
Number of interrupts
ddi_intr_disable()
DDI interrupt handle
ddi_intr_block_disable()
Pointer to an array of DDI interrupt handles
Number of interrupts
The ddi_intr_enable() function enables the interrupt given by the interrupt handle h.
The ddi_intr_block_enable() function enables a range of interrupts given by the count and h_array arguments, where count must be at least 1 and h_array is pointer to a count-sized array of interrupt handles.
The ddi_intr_block_enable() function can be used only if the device or host bridge supports the block enable/disable feature. The ddi_intr_get_cap() function returns the RO flag DDI_INTR_FLAG_BLOCK if the device or host bridge supports the interrupt block enable/disable feature for the given interrupt type. The ddi_intr_block_enable() function is useful for enabling MSI interrupts when the optional per-vector masking capability is not supported.
The ddi_intr_enable() or ddi_intr_block_enable() functions must be called after the required interrupt resources are allocated with ddi_intr_alloc(), the interrupt handlers are added through ddi_intr_add_handler(), and the required locks are initialized by mutex(9F) or rwlock(9F).
Once enabled by either of the enable calls, the interrupt can be taken and passed to the driver's interrupt service routine. Enabling an interrupt implies clearing any system or device mask bits associated with the interrupt.
The ddi_intr_disable() function disables the interrupt given by the interrupt handle h.
The ddi_intr_block_disable() function disables a range of interrupts given by the count and h_array arguments, where count must be at least 1 and h_array is pointer to a count-sized array of interrupt handles.
The ddi_intr_block_disable() function can be used only if the device or host bridge supports the block enable/disable feature. The ddi_intr_get_cap() function returns the RO flag DDI_INTR_FLAG_BLOCK if the device or host bridge supports the interrupt block enable/disable feature for the given interrupt type. The ddi_intr_block_disable() function is useful for disabling MSI interrupts when the optional per-vector masking capability is not supported.
The ddi_intr_disable() or ddi_intr_block_disable() functions must be called before removing the interrupt handler and freeing the corresponding interrupt with ddi_intr_remove_handler() and ddi_intr_free(), respectively. The ddi_intr_block_disable() function should be called if the ddi_intr_block_enable() function was used to enable the interrupts.
The ddi_intr_enable(), ddi_intr_block_enable(), ddi_intr_disable(), and ddi_intr_block_disable() functions return:
On success.
On encountering invalid input parameters.
On any implementation specific failure.
The ddi_intr_enable(), ddi_intr_block_enable(), ddi_intr_disable(), and ddi_intr_block_disable() functions can be called from kernel non-interrupt context.
See attributes(5) for descriptions of the following attributes:
|
attributes(5), ddi_intr_add_handler(9F), ddi_intr_alloc(9F), ddi_intr_dup_handler(9F), ddi_intr_free(9F), ddi_intr_get_cap(9F), ddi_intr_remove_handler(9F), mutex(9F), rwlock(9F)
Consumers of these interfaces should verify that the return value is not equal to DDI_SUCCESS. Incomplete checking for failure codes could result in inconsistent behavior among platforms.
If a device driver that uses MSI and MSI-X interrupts resets the device, the device might reset its configuration space modifications. Such a reset could cause a device driver to lose any MSI and MSI-X interrupt usage settings that have been applied.