Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenrbc.h
Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (C) Microsoft Corporation, 1998 - 1999 00004 00005 Module Name: 00006 00007 rbc.h 00008 00009 Abstract: 00010 00011 These are the structures and defines used in the Reduced Block Command set 00012 00013 Authors: 00014 00015 George Chrysanthakopoulos(georgioc) - April 1998 00016 00017 Revision History: 00018 00019 Dan Knudson (DanKn), 23 Sep 1999 - updated per rev 10 of RBC spec 00020 00021 --*/ 00022 #ifndef _NTRBC_ 00023 #define _NTRBC_ 00024 00025 #include "scsi.h" 00026 00027 // 00028 // Command Descriptor Block. encapsulated under the bus/protocol specific request block 00029 // 00030 00031 typedef union _CDB_RBC { 00032 00033 // 00034 // format unit 00035 // 00036 00037 struct _FORMAT_RBC { 00038 UCHAR OperationCode; 00039 UCHAR VendorSpecific; 00040 UCHAR Increment : 1; 00041 UCHAR Percent_Time : 1; 00042 UCHAR Reserved1 : 1; 00043 UCHAR VendorSpecific1 : 5; 00044 UCHAR Reserved2[2]; 00045 UCHAR Control; 00046 } FORMAT_RBC, *PFORMAT_RBC; 00047 00048 // 00049 // prevent/allow medium removal 00050 // 00051 00052 struct _MEDIA_REMOVAL_RBC { 00053 UCHAR OperationCode; 00054 UCHAR Reserved[3]; 00055 00056 UCHAR Prevent : 1; 00057 UCHAR Persistant : 1; 00058 UCHAR Reserved3 : 6; 00059 00060 UCHAR Control; 00061 } MEDIA_REMOVAL_RBC, *PMEDIA_REMOVAL_RBC; 00062 00063 // 00064 // START_STOP_UNIT 00065 // 00066 00067 struct _START_STOP_RBC { 00068 UCHAR OperationCode; 00069 UCHAR Immediate: 1; 00070 UCHAR Reserved1 : 7; 00071 UCHAR Reserved2[2]; 00072 UCHAR Start : 1; 00073 UCHAR LoadEject : 1; 00074 UCHAR Reserved3 : 2; 00075 UCHAR PowerConditions : 4; 00076 UCHAR Control; 00077 } START_STOP_RBC, *PSTART_STOP_RBC; 00078 00079 struct _SYNCHRONIZE_CACHE_RBC { 00080 00081 UCHAR OperationCode; // 0x35 00082 UCHAR Reserved[8]; 00083 UCHAR Control; 00084 00085 } SYNCHRONIZE_CACHE_RBC, *PSYNCHRONIZE_CACHE_RBC; 00086 00087 00088 } CDB_RBC, *PCDB_RBC; 00089 00090 00091 // 00092 // START_STOP_UNIT Power Condition descriptions 00093 // 00094 00095 #define START_STOP_RBC_POWER_CND_NO_CHANGE 0 00096 #define START_STOP_RBC_POWER_CND_ACTIVE 1 00097 #define START_STOP_RBC_POWER_CND_IDLE 2 00098 #define START_STOP_RBC_POWER_CND_STANDBY 3 00099 #define START_STOP_RBC_POWER_CND_SLEEP 5 00100 #define START_STOP_RBC_POWER_CND_DEVICE_CTRL 7 00101 00102 00103 // 00104 // Mode Sense/Select page constants. 00105 // 00106 00107 #define MODE_PAGE_RBC_DEVICE_PARAMETERS 0x06 00108 00109 00110 // 00111 // DeviceType field in inquiry Data 00112 // 00113 00114 #define RBC_DEVICE 0x0E 00115 00116 // 00117 // Define Device Capabilities page. 00118 // 00119 00120 typedef struct _MODE_RBC_DEVICE_PARAMETERS_PAGE { 00121 UCHAR PageCode : 6; 00122 UCHAR Reserved : 1; 00123 UCHAR PageSavable : 1; 00124 UCHAR PageLength; 00125 UCHAR WriteCacheDisable : 1; 00126 UCHAR Reserved1 : 7; 00127 UCHAR LogicalBlockSize[2]; 00128 UCHAR NumberOfLogicalBlocks[5]; 00129 UCHAR PowerPerformance; 00130 UCHAR LockDisabled : 1; 00131 UCHAR FormatDisabled : 1; 00132 UCHAR WriteDisabled : 1; 00133 UCHAR ReadDisabled : 1; 00134 UCHAR Reserved2 : 4; 00135 UCHAR Reserved3; 00136 00137 }MODE_RBC_DEVICE_PARAMETERS_PAGE, *PMODE_RBC_DEVICE_PARAMETERS_PAGE; 00138 00139 typedef struct _MODE_RBC_DEVICE_PARAMETERS_HEADER_AND_PAGE { 00140 00141 MODE_PARAMETER_HEADER Header; 00142 MODE_RBC_DEVICE_PARAMETERS_PAGE Page; 00143 00144 }MODE_RBC_DEVICE_PARAMETERS_HEADER_AND_PAGE, 00145 *PMODE_RBC_DEVICE_PARAMETERS_HEADER_AND_PAGE; 00146 00147 00148 // 00149 // unsolicited status sense code qualifier values 00150 // 00151 00152 #define RBC_UNSOLICITED_STATUS 0x02 00153 #define RBC_UNSOLICITED_SENSE_KEY 0x06 00154 00155 #define RBC_UNSOLICITED_SC_PWR_STATE_CHNG 0xFF 00156 #define RBC_UNSOLICITED_SC_EVENT_STATUS 0xFE 00157 00158 #define RBC_UNSOLICITED_CLASS_ASQ_DEVICE 0x06 00159 #define RBC_UNSOLICITED_CLASS_ASQ_MEDIA 0x04 00160 #define RBC_UNSOLICITED_CLASS_ASQ_POWER 0x02 00161 00162 00163 00164 00165 // 00166 // Translation routine used to convert SCSI requests that differ from RBC 00167 // 00168 00169 NTSTATUS 00170 Rbc_Scsi_Conversion( 00171 IN PSCSI_REQUEST_BLOCK Srb, 00172 IN PSCSI_REQUEST_BLOCK *OriginalSrb, 00173 IN PMODE_RBC_DEVICE_PARAMETERS_HEADER_AND_PAGE RbcHeaderAndPage, 00174 IN BOOLEAN OutgoingRequest, 00175 IN BOOLEAN RemovableMedia 00176 ); 00177 00178 00179 #endif 00180 Generated on Fri May 25 2012 04:26:45 for ReactOS by
1.7.6.1
|