home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 4 Drivers / 04-Drivers.zip / scsiopt2.zip / modepages.h < prev    next >
C/C++ Source or Header  |  1998-03-04  |  3KB  |  127 lines

  1. /*
  2.  * $Source: d:/source/driver/perf/RCS/modepages.h,v $
  3.  * $Revision: 1.5 $
  4.  * $Date: 1998/03/04 01:59:16 $
  5.  * $Locker:  $
  6.  *
  7.  * Defines structures to access SCSI mode pages.
  8.  * Refer to SCSI-II
  9.  *
  10.  * $Log: modepages.h,v $
  11.  * Revision 1.5  1998/03/04 01:59:16  vitus
  12.  * - added SCSI_MODEPAGE_D
  13.  *
  14.  * Revision 1.4  1997/12/06 00:45:49  vitus
  15.  * - WatCom detected duplicate typedef
  16.  *
  17.  * Revision 1.3  1997/11/10 01:04:05  vitus
  18.  * - corrected SCSI_MODEPAGE_2
  19.  *
  20.  * Revision 1.2  1997/10/28 01:55:59  vitus
  21.  * - switched from bitfields to complete bytes
  22.  * - named structures after page number
  23.  *
  24.  * Revision 1.1  1997/06/04 23:19:11  vitus
  25.  * Initial revision
  26.  * ----------------------------------------
  27.  * Author: Vitus Jensen, 2:2474/424
  28.  */
  29.  
  30. #if !defined(_MODEPAGES_H)
  31. #define _MODEPAGES_H
  32. #pragma pack(1)
  33.  
  34.  
  35. /* Missing in my DDK... */
  36. #define SCSI_MODE_SELECT_10    0x55
  37. #define SCSI_MODE_SENSE_10    0x5A
  38. /* end */
  39.  
  40.  
  41. typedef struct _SCSI_MODEPAGE_HDR {
  42.  
  43.     UCHAR    len;
  44.     UCHAR    medium;
  45.     UCHAR    specific;
  46.     UCHAR    descrlen;
  47.  
  48. } SCSI_MODEPAGE_HDR, * PSCSI_MODEPAGE_HDR, NEAR * NPSCSI_MODEPAGE_HDR;
  49.  
  50.  
  51. typedef struct _SCSI_MODEPAGE_DESCR {
  52.  
  53.     UCHAR    density;
  54.     UCHAR    blocks[3];
  55.     UCHAR    reserved;
  56.     UCHAR    blklen[3];
  57.  
  58. } SCSI_MODEPAGE_DESCR, * PSCSI_MODEPAGE_DESCR, NEAR * NPSCSI_MODEPAGE_DESCR;
  59.  
  60.  
  61.  
  62. typedef struct _SCSI_MODEPAGE_2 {        /* disconnect-reconnect */
  63.  
  64.     UCHAR    pcode;                /* <0:5> page code
  65.                            <7>   page is savable */
  66.     UCHAR    plength;            /* excluding this field */
  67.     UCHAR    bfull;                /* reads: x/256 before device
  68.                            reconnects */
  69.     UCHAR    bempty;                /* write: x/256 before device
  70.                            reconnects */
  71.     UCHAR    businactive[2];            /* max time in 100us */
  72.     UCHAR    disconnect[2];            /* max time in 100us */
  73.     UCHAR    connect[2];            /* max time in 100us */
  74.     UCHAR    burst[2];            /* max sectors per data burst */
  75.     UCHAR    dtdc;                /* disable/enable disconnect
  76.                            in data transfers */
  77.     UCHAR    reserved[3];
  78.  
  79. } SCSI_MODEPAGE_2, * PSCSI_MODEPAGE_2, NEAR * NPSCSI_MODEPAGE_2;
  80.  
  81.  
  82. typedef struct _SCSI_MODEPAGE_8 {        /* caching */
  83.  
  84.     UCHAR    pcode;                /* s.a. */
  85.     UCHAR    plength;            /* s.a. */
  86.     UCHAR    cache;                /* <0>  read cache disable
  87.                            <2>  write cache enable */
  88.     UCHAR    priority;            /* pre-fetch priority */
  89.     UCHAR    disprefetch[2];            /* disable pre-fetch on long
  90.                            transfers */
  91.     UCHAR    minprefetch[2];            /* minimum pre-fetch done */
  92.     UCHAR    maxprefetch[2];            /* maximum pre-fetch done */
  93.     UCHAR    prefetchceiling[2];        /* maximum pre-fetch done */
  94.  
  95. } SCSI_MODEPAGE_8, * PSCSI_MODEPAGE_8, NEAR * NPSCSI_MODEPAGE_8;
  96.  
  97.  
  98. typedef struct _SCSI_MODEPAGE_A {        /* control */
  99.  
  100.     UCHAR    pcode;                /* s.a. */
  101.     UCHAR    plength;            /* s.a. */
  102.     UCHAR    reserved1;
  103.     UCHAR    queuing;            /* <0>   disable tagged queuing
  104.                            <4:7> queue algorithm */
  105.     UCHAR    events;                /* enable asynchr. events */
  106.     UCHAR    reserved2;
  107.     UCHAR    aenholdoff[2];            /* related to asynchr. events */
  108.  
  109. } SCSI_MODEPAGE_A, * PSCSI_MODEPAGE_A, NEAR * NPSCSI_MODEPAGE_A;
  110.  
  111.  
  112. typedef struct _SCSI_MODEPAGE_D {        /* CD-ROM */
  113.  
  114.     UCHAR    pcode;                /* s.a. */
  115.     UCHAR    plength;            /* s.a. */
  116.     UCHAR    reserved1;
  117.     UCHAR    multiplier;            /* timeout code (see SCSI-II) */
  118.     UCHAR    s_units[2];            /* ??? */
  119.     UCHAR    f_units[2];            /* ??? */
  120.  
  121. } SCSI_MODEPAGE_D, * PSCSI_MODEPAGE_D, NEAR * NPSCSI_MODEPAGE_D;
  122.  
  123.  
  124.  
  125. #pragma pack()
  126. #endif /* _MODEPAGES_H */
  127.