MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                  ddiintrenable(9F)



NAME
     ddiintrenable,  ddiintrblockenable,   ddiintrdisable,
     ddiintrblockdisable - enable or disable a given interrupt
     or range of interrupts

SYNOPSIS
     #include 
     #include 
     #include 
     #include 



     int ddiintrenable(ddiintrhandlet h);


     int ddiintrblockenable(ddiintrhandlet *harray, int count);


     int ddiintrdisable(ddiintrhandlet h);


     int ddiintrblockdisable(ddiintrhandlet *harray, int count);


INTERFACE LEVEL
     Solaris DI specific (Solaris DI).

PARAMETERS
     ddiintrenable()

     h    DI interrupt handle



     ddiintrblockenable()

     harray    Pointer to an array of DI interrupt handles


     count      Number of interrupts



     ddiintrdisable()

     h    DI interrupt handle



     ddiintrblockdisable()




SunOS 5.11          Last change: 22 Apr 2005                    1






Kernel Functions for Drivers                  ddiintrenable(9F)



     harray    Pointer to an array of DI interrupt handles


     count      Number of interrupts


DESCRIPTION
     The ddiintrenable() function enables the  interrupt  given
     by the interrupt handle h.


     The ddiintrblockenable()  function  enables  a  range  of
     interrupts  given  by the count and harray arguments, where
     count must be at least 1 and harray is pointer to a  count-
     sized array of interrupt handles.


     The ddiintrblockenable() function can be used only if the
     device  or  host  bridge  supports  the block enable/disable
     feature. The ddiintrgetcap() function returns the RO flag
     DINTRFLAGBLOCK  if  the  device or host bridge supports
     the interrupt block enable/disable  feature  for  the  given
     interrupt type. The ddiintrblockenable() function is use-
     ful for enabling MSI interrupts when the optional per-vector
     masking capability is not supported.


     The ddiintrenable() or  ddiintrblockenable()  functions
     must  be  called  after the required interrupt resources are
     allocated with ddiintralloc(), the interrupt handlers  are
     added through ddiintraddhandler(), 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 ddiintrdisable() function disables the interrupt given
     by the interrupt handle h.


     The ddiintrblockdisable() function disables  a  range  of
     interrupts  given  by the count and harray arguments, where
     count must be at least 1 and harray is pointer to a  count-
     sized array of interrupt handles.


     The ddiintrblockdisable() function can be  used  only  if
     the  device or host bridge supports the block enable/disable



SunOS 5.11          Last change: 22 Apr 2005                    2






Kernel Functions for Drivers                  ddiintrenable(9F)



     feature. The ddiintrgetcap() function returns the RO flag
     DINTRFLAGBLOCK  if  the  device or host bridge supports
     the interrupt block enable/disable  feature  for  the  given
     interrupt  type.  The  ddiintrblockdisable()  function is
     useful for disabling MSI interrupts when the  optional  per-
     vector masking capability is not supported.


     The ddiintrdisable() or ddiintrblockdisable() functions
     must  be  called  before  removing the interrupt handler and
     freeing      the      corresponding      interrupt      with
     ddiintrremovehandler() and ddiintrfree(), respectively.
     The ddiintrblockdisable() function should  be  called  if
     the  ddiintrblockenable() function was used to enable the
     interrupts.

RETURN VALUES
     The       ddiintrenable(),        ddiintrblockenable(),
     ddiintrdisable(),  and  ddiintrblockdisable() functions
     return:

     DISUCES    On success.


     DIEINVAL     On encountering invalid input parameters.


     DIFAILURE    On any implementation specific failure.


CONTEXT
     The       ddiintrenable(),        ddiintrblockenable(),
     ddiintrdisable(),  and  ddiintrblockdisable() 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          Committed                   
    


SEE ALSO
     attributes(5), ddiintraddhandler(9F), ddiintralloc(9F),
     ddiintrduphandler(9F),                 ddiintrfree(9F),
     ddiintrgetcap(9F),           ddiintrremovehandler(9F),



SunOS 5.11          Last change: 22 Apr 2005                    3






Kernel Functions for Drivers                  ddiintrenable(9F)



     mutex(9F), rwlock(9F)


     Writing Device Drivers

NOTES
     Consumers of these interfaces should verify that the  return
     value  is  not equal to DISUCES. 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.






































SunOS 5.11          Last change: 22 Apr 2005                    4



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™