Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenntddscsi.h
Go to the documentation of this file.
00001 /*++ BUILD Version: 0001 // Increment this if a change has global effects 00002 00003 Copyright (c) 1990-1993 Microsoft Corporation 00004 00005 Module Name: 00006 00007 ntddscsi.h 00008 00009 Abstract: 00010 00011 This is the include file that defines all constants and types for 00012 accessing the SCSI port adapters. 00013 00014 Author: 00015 00016 Jeff Havens 00017 00018 Revision History: 00019 00020 --*/ 00021 00022 #ifndef _NTDDSCSIH_ 00023 #define _NTDDSCSIH_ 00024 00025 #pragma pack(push, 8) 00026 00027 // 00028 // Device Name - this string is the name of the device. It is the name 00029 // that should be passed to NtOpenFile when accessing the device. 00030 // 00031 // Note: For devices that support multiple units, it should be suffixed 00032 // with the Ascii representation of the unit number. 00033 // 00034 00035 #define IOCTL_SCSI_BASE FILE_DEVICE_CONTROLLER 00036 00037 #define DD_SCSI_DEVICE_NAME "\\Device\\ScsiPort" 00038 00039 00040 // 00041 // NtDeviceIoControlFile IoControlCode values for this device. 00042 // 00043 // Warning: Remember that the low two bits of the code specify how the 00044 // buffers are passed to the driver! 00045 // 00046 00047 #define IOCTL_SCSI_PASS_THROUGH CTL_CODE(IOCTL_SCSI_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) 00048 #define IOCTL_SCSI_MINIPORT CTL_CODE(IOCTL_SCSI_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) 00049 #define IOCTL_SCSI_GET_INQUIRY_DATA CTL_CODE(IOCTL_SCSI_BASE, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS) 00050 #define IOCTL_SCSI_GET_CAPABILITIES CTL_CODE(IOCTL_SCSI_BASE, 0x0404, METHOD_BUFFERED, FILE_ANY_ACCESS) 00051 #define IOCTL_SCSI_PASS_THROUGH_DIRECT CTL_CODE(IOCTL_SCSI_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) 00052 #define IOCTL_SCSI_GET_ADDRESS CTL_CODE(IOCTL_SCSI_BASE, 0x0406, METHOD_BUFFERED, FILE_ANY_ACCESS) 00053 #define IOCTL_SCSI_RESCAN_BUS CTL_CODE(IOCTL_SCSI_BASE, 0x0407, METHOD_BUFFERED, FILE_ANY_ACCESS) 00054 #define IOCTL_SCSI_GET_DUMP_POINTERS CTL_CODE(IOCTL_SCSI_BASE, 0x0408, METHOD_BUFFERED, FILE_ANY_ACCESS) 00055 00056 // 00057 // Define the SCSI pass through structure. 00058 // 00059 00060 typedef struct _SCSI_PASS_THROUGH { 00061 USHORT Length; 00062 UCHAR ScsiStatus; 00063 UCHAR PathId; 00064 UCHAR TargetId; 00065 UCHAR Lun; 00066 UCHAR CdbLength; 00067 UCHAR SenseInfoLength; 00068 UCHAR DataIn; 00069 ULONG DataTransferLength; 00070 ULONG TimeOutValue; 00071 ULONG DataBufferOffset; 00072 ULONG SenseInfoOffset; 00073 UCHAR Cdb[16]; 00074 }SCSI_PASS_THROUGH, *PSCSI_PASS_THROUGH; 00075 00076 // 00077 // Define the SCSI pass through direct structure. 00078 // 00079 00080 typedef struct _SCSI_PASS_THROUGH_DIRECT { 00081 USHORT Length; 00082 UCHAR ScsiStatus; 00083 UCHAR PathId; 00084 UCHAR TargetId; 00085 UCHAR Lun; 00086 UCHAR CdbLength; 00087 UCHAR SenseInfoLength; 00088 UCHAR DataIn; 00089 ULONG DataTransferLength; 00090 ULONG TimeOutValue; 00091 PVOID DataBuffer; 00092 ULONG SenseInfoOffset; 00093 UCHAR Cdb[16]; 00094 }SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT; 00095 00096 // 00097 // Define SCSI information. 00098 // Used with the IOCTL_SCSI_GET_INQUIRY_DATA IOCTL. 00099 // 00100 00101 typedef struct _SCSI_BUS_DATA { 00102 UCHAR NumberOfLogicalUnits; 00103 UCHAR InitiatorBusId; 00104 ULONG InquiryDataOffset; 00105 }SCSI_BUS_DATA, *PSCSI_BUS_DATA; 00106 00107 // 00108 // Define SCSI adapter bus information structure.. 00109 // Used with the IOCTL_SCSI_GET_INQUIRY_DATA IOCTL. 00110 // 00111 00112 typedef struct _SCSI_ADAPTER_BUS_INFO { 00113 UCHAR NumberOfBuses; 00114 SCSI_BUS_DATA BusData[1]; 00115 } SCSI_ADAPTER_BUS_INFO, *PSCSI_ADAPTER_BUS_INFO; 00116 00117 // 00118 // Define SCSI adapter bus information. 00119 // Used with the IOCTL_SCSI_GET_INQUIRY_DATA IOCTL. 00120 // 00121 00122 typedef struct _SCSI_INQUIRY_DATA { 00123 UCHAR PathId; 00124 UCHAR TargetId; 00125 UCHAR Lun; 00126 BOOLEAN DeviceClaimed; 00127 ULONG InquiryDataLength; 00128 ULONG NextInquiryDataOffset; 00129 UCHAR InquiryData[1]; 00130 }SCSI_INQUIRY_DATA, *PSCSI_INQUIRY_DATA; 00131 00132 // 00133 // Define header for I/O control SRB. 00134 // 00135 00136 typedef struct _SRB_IO_CONTROL { 00137 ULONG HeaderLength; 00138 UCHAR Signature[8]; 00139 ULONG Timeout; 00140 ULONG ControlCode; 00141 ULONG ReturnCode; 00142 ULONG Length; 00143 } SRB_IO_CONTROL, *PSRB_IO_CONTROL; 00144 00145 // 00146 // SCSI port driver capabilities structure. 00147 // 00148 00149 typedef struct _IO_SCSI_CAPABILITIES { 00150 00151 // 00152 // Length of this structure 00153 // 00154 00155 ULONG Length; 00156 00157 // 00158 // Maximum transfer size in single SRB 00159 // 00160 00161 ULONG MaximumTransferLength; 00162 00163 // 00164 // Maximum number of physical pages per data buffer 00165 // 00166 00167 ULONG MaximumPhysicalPages; 00168 00169 // 00170 // Async calls from port to class 00171 // 00172 00173 ULONG SupportedAsynchronousEvents; 00174 00175 // 00176 // Alignment mask for data transfers. 00177 // 00178 00179 ULONG AlignmentMask; 00180 00181 // 00182 // Supports tagged queuing 00183 // 00184 00185 BOOLEAN TaggedQueuing; 00186 00187 // 00188 // Host adapter scans down for bios devices. 00189 // 00190 00191 BOOLEAN AdapterScansDown; 00192 00193 // 00194 // The host adapter uses programmed I/O. 00195 // 00196 00197 BOOLEAN AdapterUsesPio; 00198 00199 } IO_SCSI_CAPABILITIES, *PIO_SCSI_CAPABILITIES; 00200 00201 typedef struct _SCSI_ADDRESS { 00202 ULONG Length; 00203 UCHAR PortNumber; 00204 UCHAR PathId; 00205 UCHAR TargetId; 00206 UCHAR Lun; 00207 }SCSI_ADDRESS, *PSCSI_ADDRESS; 00208 00209 // 00210 // Define structure for returning crash dump pointers. 00211 // 00212 00213 struct _ADAPTER_OBJECT; 00214 00215 typedef struct _DUMP_POINTERS { 00216 struct _ADAPTER_OBJECT *AdapterObject; 00217 PVOID MappedRegisterBase; 00218 PVOID PortConfiguration; 00219 PVOID CommonBufferVa; 00220 LARGE_INTEGER CommonBufferPa; 00221 ULONG CommonBufferSize; 00222 } DUMP_POINTERS, *PDUMP_POINTERS; 00223 00224 // 00225 // Define values for pass-through DataIn field. 00226 // 00227 00228 #define SCSI_IOCTL_DATA_OUT 0 00229 #define SCSI_IOCTL_DATA_IN 1 00230 #define SCSI_IOCTL_DATA_UNSPECIFIED 2 00231 00232 #pragma pack(pop) 00233 00234 #endif 00235 Generated on Sun May 27 2012 04:28:26 for ReactOS by
1.7.6.1
|