Annotation of ntddk/src/scsi/inc/ntddscsi.h, revision 1.1.1.1

1.1       root        1: /*++ BUILD Version: 0001    // Increment this if a change has global effects
                      2: 
                      3: Copyright (c) 1990-1993  Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:     ntddscsi.h
                      8: 
                      9: Abstract:
                     10: 
                     11:     This is the include file that defines all constants and types for
                     12:     accessing the SCSI port adapters.
                     13: 
                     14: Author:
                     15: 
                     16:     Jeff Havens
                     17: 
                     18: Revision History:
                     19: 
                     20: --*/
                     21: 
                     22: #ifndef _NTDDSCSIH_
                     23: #define _NTDDSCSIH_
                     24: 
                     25: //
                     26: // Device Name - this string is the name of the device.  It is the name
                     27: // that should be passed to NtOpenFile when accessing the device.
                     28: //
                     29: // Note:  For devices that support multiple units, it should be suffixed
                     30: //        with the Ascii representation of the unit number.
                     31: //
                     32: 
                     33: #define IOCTL_SCSI_BASE                 FILE_DEVICE_CONTROLLER
                     34: 
                     35: #define DD_SCSI_DEVICE_NAME "\\Device\\ScsiPort"
                     36: 
                     37: 
                     38: //
                     39: // NtDeviceIoControlFile IoControlCode values for this device.
                     40: //
                     41: // Warning:  Remember that the low two bits of the code specify how the
                     42: //           buffers are passed to the driver!
                     43: //
                     44: 
                     45: #define IOCTL_SCSI_PASS_THROUGH         CTL_CODE(IOCTL_SCSI_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
                     46: #define IOCTL_SCSI_MINIPORT             CTL_CODE(IOCTL_SCSI_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
                     47: #define IOCTL_SCSI_GET_INQUIRY_DATA     CTL_CODE(IOCTL_SCSI_BASE, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS)
                     48: #define IOCTL_SCSI_GET_CAPABILITIES     CTL_CODE(IOCTL_SCSI_BASE, 0x0404, METHOD_BUFFERED, FILE_ANY_ACCESS)
                     49: #define IOCTL_SCSI_PASS_THROUGH_DIRECT  CTL_CODE(IOCTL_SCSI_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
                     50: #define IOCTL_SCSI_GET_ADDRESS          CTL_CODE(IOCTL_SCSI_BASE, 0x0406, METHOD_BUFFERED, FILE_ANY_ACCESS)
                     51: 
                     52: //
                     53: // Define the SCSI pass through structure.
                     54: //
                     55: 
                     56: typedef struct _SCSI_PASS_THROUGH {
                     57:     USHORT Length;
                     58:     UCHAR ScsiStatus;
                     59:     UCHAR PathId;
                     60:     UCHAR TargetId;
                     61:     UCHAR Lun;
                     62:     UCHAR CdbLength;
                     63:     UCHAR SenseInfoLength;
                     64:     UCHAR DataIn;
                     65:     ULONG DataTransferLength;
                     66:     ULONG TimeOutValue;
                     67:     ULONG DataBufferOffset;
                     68:     ULONG SenseInfoOffset;
                     69:     UCHAR Cdb[16];
                     70: }SCSI_PASS_THROUGH, *PSCSI_PASS_THROUGH;
                     71: 
                     72: //
                     73: // Define the SCSI pass through direct structure.
                     74: //
                     75: 
                     76: typedef struct _SCSI_PASS_THROUGH_DIRECT {
                     77:     USHORT Length;
                     78:     UCHAR ScsiStatus;
                     79:     UCHAR PathId;
                     80:     UCHAR TargetId;
                     81:     UCHAR Lun;
                     82:     UCHAR CdbLength;
                     83:     UCHAR SenseInfoLength;
                     84:     UCHAR DataIn;
                     85:     ULONG DataTransferLength;
                     86:     ULONG TimeOutValue;
                     87:     PVOID DataBuffer;
                     88:     ULONG SenseInfoOffset;
                     89:     UCHAR Cdb[16];
                     90: }SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT;
                     91: 
                     92: //
                     93: // Define SCSI information.
                     94: // Used with the IOCTL_SCSI_GET_INQUIRY_DATA IOCTL.
                     95: //
                     96: 
                     97: typedef struct _SCSI_BUS_DATA {
                     98:     UCHAR NumberOfLogicalUnits;
                     99:     UCHAR InitiatorBusId;
                    100:     ULONG InquiryDataOffset;
                    101: }SCSI_BUS_DATA, *PSCSI_BUS_DATA;
                    102: 
                    103: //
                    104: // Define SCSI adapter bus information structure..
                    105: // Used with the IOCTL_SCSI_GET_INQUIRY_DATA IOCTL.
                    106: //
                    107: 
                    108: typedef struct _SCSI_ADAPTER_BUS_INFO {
                    109:     UCHAR NumberOfBuses;
                    110:     SCSI_BUS_DATA BusData[1];
                    111: } SCSI_ADAPTER_BUS_INFO, *PSCSI_ADAPTER_BUS_INFO;
                    112: 
                    113: //
                    114: // Define SCSI adapter bus information.
                    115: // Used with the IOCTL_SCSI_GET_INQUIRY_DATA IOCTL.
                    116: //
                    117: 
                    118: typedef struct _SCSI_INQUIRY_DATA {
                    119:     UCHAR PathId;
                    120:     UCHAR TargetId;
                    121:     UCHAR Lun;
                    122:     BOOLEAN DeviceClaimed;
                    123:     ULONG InquiryDataLength;
                    124:     ULONG NextInquiryDataOffset;
                    125:     UCHAR InquiryData[1];
                    126: }SCSI_INQUIRY_DATA, *PSCSI_INQUIRY_DATA;
                    127: 
                    128: //
                    129: // Define header for I/O control SRB.
                    130: //
                    131: 
                    132: typedef struct _SRB_IO_CONTROL {
                    133:         ULONG HeaderLength;
                    134:         UCHAR Signature[8];
                    135:         ULONG Timeout;
                    136:         ULONG ControlCode;
                    137:         ULONG ReturnCode;
                    138:         ULONG Length;
                    139: } SRB_IO_CONTROL, *PSRB_IO_CONTROL;
                    140: 
                    141: //
                    142: // SCSI port driver capabilities structure.
                    143: //
                    144: 
                    145: typedef struct _IO_SCSI_CAPABILITIES {
                    146: 
                    147:     //
                    148:     // Length of this structure
                    149:     //
                    150: 
                    151:     ULONG Length;
                    152: 
                    153:     //
                    154:     // Maximum transfer size in single SRB
                    155:     //
                    156: 
                    157:     ULONG MaximumTransferLength;
                    158: 
                    159:     //
                    160:     // Maximum number of physical pages per data buffer
                    161:     //
                    162: 
                    163:     ULONG MaximumPhysicalPages;
                    164: 
                    165:     //
                    166:     // Async calls from port to class
                    167:     //
                    168: 
                    169:     ULONG SupportedAsynchronousEvents;
                    170: 
                    171:     //
                    172:     // Alignment mask for data transfers.
                    173:     //
                    174: 
                    175:     ULONG AlignmentMask;
                    176: 
                    177:     //
                    178:     // Supports tagged queuing
                    179:     //
                    180: 
                    181:     BOOLEAN TaggedQueuing;
                    182: 
                    183:     //
                    184:     // Host adapter scans down for bios devices.
                    185:     //
                    186: 
                    187:     BOOLEAN AdapterScansDown;
                    188: 
                    189:     //
                    190:     // The host adapter uses programmed I/O.
                    191:     //
                    192: 
                    193:     BOOLEAN AdapterUsesPio;
                    194: 
                    195: } IO_SCSI_CAPABILITIES, *PIO_SCSI_CAPABILITIES;
                    196: 
                    197: typedef struct _SCSI_ADDRESS {
                    198:     ULONG Length;
                    199:     UCHAR PortNumber;
                    200:     UCHAR PathId;
                    201:     UCHAR TargetId;
                    202:     UCHAR Lun;
                    203: }SCSI_ADDRESS, *PSCSI_ADDRESS;
                    204: 
                    205: //
                    206: // Define values for pass-through DataIn field.
                    207: //
                    208: 
                    209: #define SCSI_IOCTL_DATA_OUT          0
                    210: #define SCSI_IOCTL_DATA_IN           1
                    211: #define SCSI_IOCTL_DATA_UNSPECIFIED  2
                    212: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.