ddi_intr_disable(9f) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

ddi_intr_disable(9f)

ddi_intr_enable(9F)            Kernel Functions            ddi_intr_enable(9F)

NAME
       ddi_intr_enable,        ddi_intr_block_enable,        ddi_intr_disable,
       ddi_intr_block_disable - enable or disable a given interrupt  or  range
       of interrupts

SYNOPSIS
       #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);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

PARAMETERS
       ddi_intr_enable()

       h    DDI interrupt handle



       ddi_intr_block_enable()

       h_array    Pointer to an array of DDI interrupt handles


       count      Number of interrupts



       ddi_intr_disable()

       h    DDI interrupt handle



       ddi_intr_block_disable()

       h_array    Pointer to an array of DDI interrupt handles


       count      Number of interrupts


DESCRIPTION
       The  ddi_intr_enable()  function enables the interrupt given by the in‐
       terrupt 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() func‐
       tion 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 mu‐
       tex(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 in‐
       terrupt implies clearing any system or device mask bits associated with
       the interrupt.


       The ddi_intr_disable() function disables the interrupt given by the in‐
       terrupt 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  corre‐
       sponding  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.

RETURN VALUES
       The ddi_intr_enable(), ddi_intr_block_enable(), ddi_intr_disable(), and
       ddi_intr_block_disable() functions return:

       DDI_SUCCESS    On success.


       DDI_EINVAL     On encountering invalid input parameters.


       DDI_FAILURE    On any implementation specific failure.


CONTEXT
       The ddi_intr_enable(), ddi_intr_block_enable(), ddi_intr_disable(), and
       ddi_intr_block_disable() functions can be called from kernel non-inter‐
       rupt context.

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted


SEE ALSO
       attributes(7),         ddi_intr_remove_handler(9F),         rwlock(9F),
       ddi_intr_add_handler(9F), ddi_intr_alloc(9F), ddi_intr_dup_handler(9F),
       ddi_intr_free(9F), ddi_intr_get_cap(9F), mutex(9F)


       Writing Device Drivers in Oracle Solaris 11.4

NOTES
       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  de‐
       vice,  the  device  might  reset its configuration space modifications.
       Such a reset could cause a device driver to lose any MSI and MSI-X  in‐
       terrupt usage settings that have been applied.

Oracle Solaris 11.4               22 Apr 2005              ddi_intr_enable(9F)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3