Print this page
XXXX introduce drv_sectohz


  30  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  31  * DAMAGE.
  32  */
  33 
  34 /*
  35  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  36  * Use is subject to license terms.
  37  */
  38 
  39 #ifndef _SFE_UTIL_H_
  40 #define _SFE_UTIL_H_
  41 #include <sys/mac_provider.h>
  42 #include <sys/mac_ether.h>
  43 
  44 /*
  45  * Useful macros and typedefs
  46  */
  47 
  48 #define GEM_NAME_LEN    32
  49 
  50 #define GEM_TX_TIMEOUT          (drv_usectohz(5*1000000))
  51 #define GEM_TX_TIMEOUT_INTERVAL (drv_usectohz(1*1000000))
  52 #define GEM_LINK_WATCH_INTERVAL (drv_usectohz(1*1000000))       /* 1 sec */
  53 
  54 /* general return code */
  55 #define GEM_SUCCESS     0
  56 #define GEM_FAILURE     (-1)
  57 
  58 /* return code of gem_tx_done */
  59 #define INTR_RESTART_TX 0x80000000
  60 
  61 typedef int32_t         seqnum_t;
  62 
  63 /*
  64  * I/O instructions
  65  */
  66 #define OUTB(dp, p, v)  \
  67         ddi_put8((dp)->regs_handle, \
  68                 (void *)((caddr_t)((dp)->base_addr) + (p)), v)
  69 #define OUTW(dp, p, v)  \
  70         ddi_put16((dp)->regs_handle, \
  71                 (void *)((caddr_t)((dp)->base_addr) + (p)), v)
  72 #define OUTL(dp, p, v)  \




  30  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  31  * DAMAGE.
  32  */
  33 
  34 /*
  35  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  36  * Use is subject to license terms.
  37  */
  38 
  39 #ifndef _SFE_UTIL_H_
  40 #define _SFE_UTIL_H_
  41 #include <sys/mac_provider.h>
  42 #include <sys/mac_ether.h>
  43 
  44 /*
  45  * Useful macros and typedefs
  46  */
  47 
  48 #define GEM_NAME_LEN    32
  49 
  50 #define GEM_TX_TIMEOUT          drv_sectohz(5)
  51 #define GEM_TX_TIMEOUT_INTERVAL drv_sectohz(1)
  52 #define GEM_LINK_WATCH_INTERVAL drv_sectohz(1)
  53 
  54 /* general return code */
  55 #define GEM_SUCCESS     0
  56 #define GEM_FAILURE     (-1)
  57 
  58 /* return code of gem_tx_done */
  59 #define INTR_RESTART_TX 0x80000000
  60 
  61 typedef int32_t         seqnum_t;
  62 
  63 /*
  64  * I/O instructions
  65  */
  66 #define OUTB(dp, p, v)  \
  67         ddi_put8((dp)->regs_handle, \
  68                 (void *)((caddr_t)((dp)->base_addr) + (p)), v)
  69 #define OUTW(dp, p, v)  \
  70         ddi_put16((dp)->regs_handle, \
  71                 (void *)((caddr_t)((dp)->base_addr) + (p)), v)
  72 #define OUTL(dp, p, v)  \