update for HEAD-2003091401
[reactos.git] / drivers / storage / atapi / atapi.h
index 6688b4c..f179d41 100644 (file)
@@ -75,6 +75,7 @@ extern "C" {
 #define    IDE_CMD_FLUSH_CACHE_EXT  0xEA
 #define    IDE_CMD_IDENT_ATA_DRV    0xEC
 #define    IDE_CMD_IDENT_ATAPI_DRV  0xA1
+#define    IDE_CMD_GET_MEDIA_STATUS 0xDA
 
 //
 //  Access macros for command registers
@@ -179,10 +180,65 @@ typedef struct _IDE_DRIVE_IDENTIFY
   WORD  RWMultCurrent;       /*59*/
   WORD  TMSectorCountLo;     /*60*/
   WORD  TMSectorCountHi;     /*61*/
-  WORD  Reserved62[193];     /*62*/
+  WORD  DmaModes;            /*62*/
+  WORD  MultiDmaModes;       /*63*/
+  WORD  Reserved64[5];       /*64*/
+  WORD  Reserved69[2];       /*69*/
+  WORD  Reserved71[4];       /*71*/
+  WORD  MaxQueueDepth;       /*75*/
+  WORD  Reserved76[4];       /*76*/
+  WORD  MajorRevision;       /*80*/
+  WORD  MinorRevision;       /*81*/
+  WORD  SupportedFeatures82; /*82*/
+  WORD  SupportedFeatures83; /*83*/
+  WORD  SupportedFeatures84; /*84*/
+  WORD  EnabledFeatures85;   /*85*/
+  WORD  EnabledFeatures86;   /*86*/
+  WORD  EnabledFeatures87;   /*87*/
+  WORD  UltraDmaModes;       /*88*/
+  WORD  Reserved89[11];      /*89*/
+  WORD  Max48BitAddress[4];  /*100*/
+  WORD  Reserved104[151];    /*104*/
   WORD  Checksum;            /*255*/
 } IDE_DRIVE_IDENTIFY, *PIDE_DRIVE_IDENTIFY;
 
+
+/* Special ATAPI commands */
+
+#define ATAPI_FORMAT_UNIT      0x24
+#define ATAPI_MODE_SELECT      0x55
+#define ATAPI_MODE_SENSE       0x5A
+
+
+/* Special ATAPI_MODE_SELECT (12 bytes) command block */
+
+typedef struct _ATAPI_MODE_SELECT12
+{
+  UCHAR OperationCode;
+  UCHAR Reserved1:4;
+  UCHAR PFBit:1;
+  UCHAR Reserved2:3;
+  UCHAR Reserved3[5];
+  UCHAR ParameterListLengthMsb;
+  UCHAR ParameterListLengthLsb;
+  UCHAR Reserved4[3];
+} ATAPI_MODE_SELECT12, *PATAPI_MODE_SELECT12;
+
+
+/* Special ATAPI_MODE_SENSE (12 bytes) command block */
+
+typedef struct _ATAPI_MODE_SENSE12
+{
+  UCHAR OperationCode;
+  UCHAR Reserved1;
+  UCHAR PageCode:6;
+  UCHAR Pc:2;
+  UCHAR Reserved2[4];
+  UCHAR ParameterListLengthMsb;
+  UCHAR ParameterListLengthLsb;
+  UCHAR Reserved3[3];
+} ATAPI_MODE_SENSE12, *PATAPI_MODE_SENSE12;
+
 #ifdef __cplusplus
 }
 #endif