ReactOS  0.4.15-dev-439-g292f67a
rbc.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (C) Microsoft Corporation, 1998 - 1999
4 
5 Module Name:
6 
7  rbc.h
8 
9 Abstract:
10 
11  These are the structures and defines used in the Reduced Block Command set
12 
13 Authors:
14 
15  George Chrysanthakopoulos(georgioc) - April 1998
16 
17 Revision History:
18 
19  Dan Knudson (DanKn), 23 Sep 1999 - updated per rev 10 of RBC spec
20 
21 --*/
22 #ifndef _NTRBC_
23 #define _NTRBC_
24 
25 #include "scsi.h"
26 
27 //
28 // Command Descriptor Block. encapsulated under the bus/protocol specific request block
29 //
30 
31 typedef union _CDB_RBC {
32 
33  //
34  // format unit
35  //
36 
37  struct _FORMAT_RBC {
47 
48  //
49  // prevent/allow medium removal
50  //
51 
55 
59 
62 
63  //
64  // START_STOP_UNIT
65  //
66 
67  struct _START_STOP_RBC {
72  UCHAR Start : 1;
78 
80 
84 
86 
87 
88 } CDB_RBC, *PCDB_RBC;
89 
90 
91 //
92 // START_STOP_UNIT Power Condition descriptions
93 //
94 
95 #define START_STOP_RBC_POWER_CND_NO_CHANGE 0
96 #define START_STOP_RBC_POWER_CND_ACTIVE 1
97 #define START_STOP_RBC_POWER_CND_IDLE 2
98 #define START_STOP_RBC_POWER_CND_STANDBY 3
99 #define START_STOP_RBC_POWER_CND_SLEEP 5
100 #define START_STOP_RBC_POWER_CND_DEVICE_CTRL 7
101 
102 
103 //
104 // Mode Sense/Select page constants.
105 //
106 
107 #define MODE_PAGE_RBC_DEVICE_PARAMETERS 0x06
108 
109 
110 //
111 // DeviceType field in inquiry Data
112 //
113 
114 #define RBC_DEVICE 0x0E
115 
116 //
117 // Define Device Capabilities page.
118 //
119 
136 
138 
140 
143 
146 
147 
148 //
149 // unsolicited status sense code qualifier values
150 //
151 
152 #define RBC_UNSOLICITED_STATUS 0x02
153 #define RBC_UNSOLICITED_SENSE_KEY 0x06
154 
155 #define RBC_UNSOLICITED_SC_PWR_STATE_CHNG 0xFF
156 #define RBC_UNSOLICITED_SC_EVENT_STATUS 0xFE
157 
158 #define RBC_UNSOLICITED_CLASS_ASQ_DEVICE 0x06
159 #define RBC_UNSOLICITED_CLASS_ASQ_MEDIA 0x04
160 #define RBC_UNSOLICITED_CLASS_ASQ_POWER 0x02
161 
162 
163 
164 
165 //
166 // Translation routine used to convert SCSI requests that differ from RBC
167 //
168 
169 NTSTATUS
172  IN PSCSI_REQUEST_BLOCK *OriginalSrb,
174  IN BOOLEAN OutgoingRequest,
176  );
177 
178 
179 #endif
180 
struct _CDB_RBC::_START_STOP_RBC START_STOP_RBC
#define IN
Definition: typedefs.h:39
UCHAR Percent_Time
Definition: rbc.h:41
UCHAR Reserved1
Definition: rbc.h:42
union _CDB_RBC CDB_RBC
UCHAR OperationCode
Definition: rbc.h:38
LONG NTSTATUS
Definition: precomp.h:26
struct _CDB_RBC::_SYNCHRONIZE_CACHE_RBC * PSYNCHRONIZE_CACHE_RBC
struct _CDB_RBC::_MEDIA_REMOVAL_RBC MEDIA_REMOVAL_RBC
union _CDB_RBC * PCDB_RBC
struct _CDB_RBC::_FORMAT_RBC FORMAT_RBC
UCHAR VendorSpecific1
Definition: rbc.h:43
UCHAR Reserved2[2]
Definition: rbc.h:44
NTSTATUS Rbc_Scsi_Conversion(IN PSCSI_REQUEST_BLOCK Srb, IN PSCSI_REQUEST_BLOCK *OriginalSrb, IN PMODE_RBC_DEVICE_PARAMETERS_HEADER_AND_PAGE RbcHeaderAndPage, IN BOOLEAN OutgoingRequest, IN BOOLEAN RemovableMedia)
struct _CDB_RBC::_START_STOP_RBC * PSTART_STOP_RBC
unsigned char BOOLEAN
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
struct _MODE_RBC_DEVICE_PARAMETERS_HEADER_AND_PAGE * PMODE_RBC_DEVICE_PARAMETERS_HEADER_AND_PAGE
MODE_PARAMETER_HEADER Header
Definition: rbc.h:141
struct _MODE_RBC_DEVICE_PARAMETERS_HEADER_AND_PAGE MODE_RBC_DEVICE_PARAMETERS_HEADER_AND_PAGE
struct _MODE_RBC_DEVICE_PARAMETERS_PAGE MODE_RBC_DEVICE_PARAMETERS_PAGE
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _CDB_RBC::_FORMAT_RBC * PFORMAT_RBC
struct _CDB_RBC::_MEDIA_REMOVAL_RBC * PMEDIA_REMOVAL_RBC
struct _MODE_RBC_DEVICE_PARAMETERS_PAGE * PMODE_RBC_DEVICE_PARAMETERS_PAGE
UCHAR VendorSpecific
Definition: rbc.h:39
UCHAR Reserved2[2]
Definition: rbc.h:71
Definition: rbc.h:31
UCHAR Increment
Definition: rbc.h:40
MODE_RBC_DEVICE_PARAMETERS_PAGE Page
Definition: rbc.h:142
IN PSCSI_REQUEST_BLOCK Srb
Definition: class2.h:49
struct _CDB_RBC::_SYNCHRONIZE_CACHE_RBC SYNCHRONIZE_CACHE_RBC