home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / DASD / OS2SCSI / SCDATA.C < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-14  |  4.8 KB  |  106 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /*static char *SCCSID = "src/dev/dasd/os2scsi/scdata.c, scsy, ddk_subset, b_bdd.032 93/03/19";*/
  13. /**************************************************************************
  14.  *
  15.  * SOURCE FILE NAME = SCDATA.C
  16.  *
  17.  * DESCRIPTIVE NAME = OS2SCSI.DMD - OS/2 SCSI.SYS Emulation
  18.  *
  19.  *
  20.  *
  21.  * VERSION = V2.0
  22.  *
  23.  * DATE
  24.  *
  25.  * DESCRIPTION : Static/Initialization Data
  26.  *
  27.  *
  28.  *
  29. */
  30.  
  31. #define INCL_NOBASEAPI
  32. #define INCL_NOPMAPI
  33. #include "os2.h"
  34. #include "devhdr.h"
  35. #include "strat2.h"
  36. #include "reqpkt.h"
  37. #include "scb.h"
  38. #include "iorb.h"
  39. #include "scsi.h"
  40. #include "scscsi.h"
  41. #include "scgen.h"
  42. #include "scproto.h"
  43.  
  44.  
  45. /***************************************************************/
  46. /*  GLOBAL DATA                                                */
  47. /*  -----------                                                */
  48. /***************************************************************/
  49.  
  50. /*-------------------------------------------------------------*/
  51. /* Disk Device Driver Header                                   */
  52. /*                                                             */
  53. /* This must be at the beginning of the data segment           */
  54. /* AND MUST NOT BE MOVED.                                      */
  55. /*-------------------------------------------------------------*/
  56.  
  57. struct _DDHDR DiskDDHeader =
  58. {
  59.    (PVOID) -1L,                         /* Pointer to next DD Header          */
  60.    DEVLEV_3 | DEV_CHAR_DEV | DEV_IOCTL, /* Device attribute (2 bytes)         */
  61.    (USHORT) DDStrat1Entry,              /* Offset to Strategy routine         */
  62.    (USHORT) IDCEntry,                   /* Offset to IDC Entry Point          */
  63.    "SCSI-02$",                          /* Device Name (the same as SCSI.SYS) */
  64.    0,                                   /* Protect mode CS of strategy EP     */
  65.    0,                                   /* Protect mode DS of strategy EP     */
  66.    0,
  67.    0,
  68.    DEV_ADAPTER_DD
  69. };
  70.  
  71.  
  72. USHORT          NumDrivers = 0;            /* number of adapter drivers       */
  73. USHORT          NumUnitCBs = 0;            /* number of unit control blocks   */
  74.  
  75. NPSELARRAY      npSelArray = 0;            /* near pointer to GDT sel buffer  */
  76.  
  77. ULONG           plDataSeg= 0;              /* linear addr of our data seg     */
  78. PVOID           pDataSeg = 0;              /* virt ptr of our data segment    */
  79. PFN             Device_Help=0L;            /* far ptr to devhelp function     */
  80.  
  81. UCHAR           CDB_cCode_to_cLen[8] =     /* Maps high 3 bits of CDB         */
  82.                  {0x06, 0x0A, 0x0A, 0x00,  /* command code to CDB length.     */
  83.                   0x00, 0x0C, 0x0A, 0x00};
  84.  
  85. USHORT          GDTSelStack[MAX_GDT_SEL_STACK+1] = {0};
  86. USHORT          GDTSelStackPtr = MAX_GDT_SEL_STACK;
  87.  
  88. TSB             TSB_GetCmdCmp = {
  89.                                  1,        /* Ending status                   */
  90.                                  0,        /* Retry count                     */
  91.                                  0,        /* Residual byte count             */
  92.                                  0,        /* Residual physical buffer addr   */
  93.                                  0x0c,     /* Additional status length        */
  94.                                  0,        /* SCSI Status                     */
  95.                                  1,        /* Command status                  */
  96.                                  0,        /* Device error code               */
  97.                                  0,        /* Command error code              */
  98.                                  0,        /* Diagnostic error modifier       */
  99.                                  0,        /* Cache info word                 */
  100.                                  0   };    /* Phys ptr to last SCB processed  */
  101.  
  102. /* Dont put any other static data past here.  Will get blown away by pool */
  103. UNITCB          UnitCB[1] = {0};           /* UnitCBs allocated here          */
  104. UCHAR           Pool[(sizeof(UNITCB) * MAX_SCSI_DEVICES) + sizeof(INITDATA)] = {0};
  105.  
  106.