Print this page
5084 struct ecppunit's e_busy is multi-value, can't be a boolean_t

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/ecppvar.h
          +++ new/usr/src/uts/common/sys/ecppvar.h
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  #ifndef _SYS_ECPPVAR_H
  28   28  #define _SYS_ECPPVAR_H
  29   29  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   30  #include <sys/note.h>
  33   31  
  34   32  #ifdef  __cplusplus
  35   33  extern "C" {
  36   34  #endif
  37   35  
  38   36  struct ecppunit;
  39   37  
  40   38  /*
  41   39   * Hardware-abstraction structure
↓ open down ↓ 47 lines elided ↑ open up ↑
  89   87  
  90   88  /*
  91   89   * Hardware binding structure
  92   90   */
  93   91  struct ecpp_hw_bind {
  94   92          char            *name;          /* binding name */
  95   93          struct ecpp_hw  *hw;            /* hw description */
  96   94          char            *info;          /* info string */
  97   95  };
  98   96  
       97 +/* ecpp e_busy states */
       98 +typedef enum {
       99 +        ECPP_IDLE = 1,  /* No ongoing transfers */
      100 +        ECPP_BUSY = 2,  /* Ongoing transfers on the cable */
      101 +        ECPP_DATA = 3,  /* Not used */
      102 +        ECPP_ERR = 4,   /* Bad status in Centronics mode */
      103 +        ECPP_FLUSH = 5  /* Currently flushing the q */
      104 +} ecpp_busy_t;
      105 +
  99  106  /*
 100  107   * ecpp soft state structure
 101  108   */
 102  109  struct ecppunit {
 103  110          kmutex_t        umutex;         /* lock for this structure */
 104  111          int             instance;       /* instance number */
 105  112          dev_info_t      *dip;           /* device information */
 106  113          ddi_iblock_cookie_t ecpp_trap_cookie;   /* interrupt cookie */
 107      -        boolean_t       e_busy;         /* ecpp busy flag */
      114 +        ecpp_busy_t     e_busy;         /* ecpp busy flag */
 108  115          kcondvar_t      pport_cv;       /* cv to signal idle state */
 109  116          /*
 110  117           * common SuperIO registers
 111  118           */
 112  119          struct info_reg         *i_reg;         /* info registers */
 113  120          struct fifo_reg         *f_reg;         /* fifo register */
 114  121          ddi_acc_handle_t        i_handle;
 115  122          ddi_acc_handle_t        f_handle;
 116  123          /*
 117  124           * DMA support
↓ open down ↓ 153 lines elided ↑ open up ↑
 271  278  #define ECPP_PHASE_EPP_INIT_IDLE 0x40   /* epp init phase */
 272  279  #define ECPP_PHASE_EPP_IDLE     0x41    /* epp all-round phase */
 273  280  
 274  281  #define FAILURE_PHASE           0x80
 275  282  #define UNDEFINED_PHASE         0x81
 276  283  
 277  284  /* ecpp return values */
 278  285  #define SUCCESS         1
 279  286  #define FAILURE         2
 280  287  
 281      -/* ecpp e_busy states */
 282      -#define ECPP_IDLE       1 /* No ongoing transfers */
 283      -#define ECPP_BUSY       2 /* Ongoing transfers on the cable */
 284      -#define ECPP_DATA       3 /* Not used */
 285      -#define ECPP_ERR        4 /* Bad status in Centronics mode */
 286      -#define ECPP_FLUSH      5 /* Currently flushing the q */
 287      -
 288  288  #define TRUE            1
 289  289  #define FALSE           0
 290  290  
 291  291  /* message type */
 292  292  #define ECPP_BACKCHANNEL        0x45
 293  293  
 294  294  /* transfer modes */
 295  295  #define ECPP_DMA                0x1
 296  296  #define ECPP_PIO                0x2
 297  297  
↓ open down ↓ 225 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX