[4] | 1 | /* $Id: winaspi.h,v 1.1 1999-05-24 20:19:21 ktk Exp $ */
|
---|
| 2 |
|
---|
| 3 | #if !defined(WINASPI_H)
|
---|
| 4 | #define WINASPI_H
|
---|
| 5 |
|
---|
| 6 | #include "pshpack1.h"
|
---|
| 7 |
|
---|
| 8 | #define ASPI_DOS 1
|
---|
| 9 | #define ASPI_WIN16 2
|
---|
| 10 |
|
---|
| 11 | typedef union SRB16 * LPSRB16;
|
---|
| 12 |
|
---|
| 13 | typedef struct tagSRB_HaInquiry16 {
|
---|
| 14 | BYTE SRB_Cmd;
|
---|
| 15 | BYTE SRB_Status;
|
---|
| 16 | BYTE SRB_HaId;
|
---|
| 17 | BYTE SRB_Flags;
|
---|
| 18 | WORD SRB_55AASignature;
|
---|
| 19 | WORD SRB_ExtBufferSize;
|
---|
| 20 | BYTE HA_Count;
|
---|
| 21 | BYTE HA_SCSI_ID;
|
---|
| 22 | BYTE HA_ManagerId[16];
|
---|
| 23 | BYTE HA_Identifier[16];
|
---|
| 24 | BYTE HA_Unique[16];
|
---|
| 25 | BYTE HA_ExtBuffer[4];
|
---|
| 26 | } SRB_HaInquiry16 WINE_PACKED;
|
---|
| 27 |
|
---|
| 28 | typedef struct tagSRB_ExecSCSICmd16 {
|
---|
| 29 | BYTE SRB_Cmd; /* ASPI command code (W) */
|
---|
| 30 | BYTE SRB_Status; /* ASPI command status byte (R) */
|
---|
| 31 | BYTE SRB_HaId; /* ASPI host adapter number (W) */
|
---|
| 32 | BYTE SRB_Flags; /* ASPI request flags (W) */
|
---|
| 33 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 (-) */
|
---|
| 34 | BYTE SRB_Target; /* Target's SCSI ID (W) */
|
---|
| 35 | BYTE SRB_Lun; /* Target's LUN number (W) */
|
---|
| 36 | DWORD SRB_BufLen; /* Data Allocation LengthPG (W/R)*/
|
---|
| 37 | BYTE SRB_SenseLen; /* Sense Allocation Length (W) */
|
---|
| 38 | SEGPTR SRB_BufPointer; /* Data Buffer Pointer (W) */
|
---|
| 39 | DWORD SRB_Rsvd1; /* Reserved, MUST = 0 (-/W)*/
|
---|
| 40 | BYTE SRB_CDBLen; /* CDB Length = 6 (W) */
|
---|
| 41 | BYTE SRB_HaStat; /* Host Adapter Status (R) */
|
---|
| 42 | BYTE SRB_TargStat; /* Target Status (R) */
|
---|
| 43 | FARPROC16 SRB_PostProc; /* Post routine (W) */
|
---|
| 44 | BYTE SRB_Rsvd2[34]; /* Reserved, MUST = 0 */
|
---|
| 45 | BYTE CDBByte[0]; /* SCSI CBD - variable length (W) */
|
---|
| 46 | /* variable example for 6 byte cbd
|
---|
| 47 | * BYTE CDBByte[6]; * SCSI CDB (W) *
|
---|
| 48 | * BYTE SenseArea6[SENSE_LEN]; * Request Sense buffer (R) *
|
---|
| 49 | */
|
---|
| 50 | } SRB_ExecSCSICmd16 WINE_PACKED;
|
---|
| 51 |
|
---|
| 52 | typedef struct tagSRB_Abort16 {
|
---|
| 53 | BYTE SRB_Cmd; /* ASPI command code = SC_ABORT_SRB */
|
---|
| 54 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
| 55 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
| 56 | BYTE SRB_Flags; /* ASPI request flags */
|
---|
| 57 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
---|
| 58 | LPSRB16 SRB_ToAbort; /* Pointer to SRB to abort */
|
---|
| 59 | } SRB_Abort16 WINE_PACKED;
|
---|
| 60 |
|
---|
| 61 | typedef struct tagSRB_BusDeviceReset16 {
|
---|
| 62 | BYTE SRB_Cmd; /* ASPI command code = SC_RESET_DEV */
|
---|
| 63 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
| 64 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
| 65 | BYTE SRB_Flags; /* ASPI request flags */
|
---|
| 66 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
---|
| 67 | BYTE SRB_Target; /* Target's SCSI ID */
|
---|
| 68 | BYTE SRB_Lun; /* Target's LUN number */
|
---|
| 69 | BYTE SRB_ResetRsvd1[14]; /* Reserved, MUST = 0 */
|
---|
| 70 | BYTE SRB_HaStat; /* Host Adapter Status */
|
---|
| 71 | BYTE SRB_TargStat; /* Target Status */
|
---|
| 72 | SEGPTR SRB_PostProc; /* Post routine */
|
---|
| 73 | BYTE SRB_ResetRsvd2[34]; /* Reserved, MUST = 0 */
|
---|
| 74 | } SRB_BusDeviceReset16 WINE_PACKED;
|
---|
| 75 |
|
---|
| 76 | typedef struct tagSRB_GDEVBlock16 {
|
---|
| 77 | BYTE SRB_Cmd; /* ASPI command code = SC_GET_DEV_TYPE */
|
---|
| 78 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
| 79 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
| 80 | BYTE SRB_Flags; /* ASPI request flags */
|
---|
| 81 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
---|
| 82 | BYTE SRB_Target; /* Target's SCSI ID */
|
---|
| 83 | BYTE SRB_Lun; /* Target's LUN number */
|
---|
| 84 | BYTE SRB_DeviceType; /* Target's peripheral device type */
|
---|
| 85 | } SRB_GDEVBlock16 WINE_PACKED;
|
---|
| 86 |
|
---|
| 87 | typedef struct tagSRB_Common16 {
|
---|
| 88 | BYTE SRB_Cmd;
|
---|
| 89 | } SRB_Common16;
|
---|
| 90 |
|
---|
| 91 | union SRB16 {
|
---|
| 92 | SRB_Common16 common;
|
---|
| 93 | SRB_HaInquiry16 inquiry;
|
---|
| 94 | SRB_ExecSCSICmd16 cmd;
|
---|
| 95 | SRB_Abort16 abort;
|
---|
| 96 | SRB_BusDeviceReset16 reset;
|
---|
| 97 | SRB_GDEVBlock16 devtype;
|
---|
| 98 | };
|
---|
| 99 |
|
---|
| 100 | typedef union SRB16 SRB16;
|
---|
| 101 |
|
---|
| 102 | #include "poppack.h"
|
---|
| 103 |
|
---|
| 104 | #endif
|
---|