[USBOHCI_NEW][USBUHCI_NEW] Avoid unnecessary/incorrect status defines.
[reactos.git] / drivers / storage / storahci / storahci.h
index 03378c5..8c5277d 100644 (file)
@@ -9,9 +9,14 @@
 #include <ata.h>
 #include <storport.h>
 
+#define NDEBUG
+#include <debug.h>
+
 #define DEBUG 1
+#if defined(_MSC_VER)
 #pragma warning(disable:4214) // bit field types other than int
 #pragma warning(disable:4201) // nameless struct/union
+#endif
 
 #define MAXIMUM_AHCI_PORT_COUNT             32
 #define MAXIMUM_AHCI_PRDT_ENTRIES           32
@@ -76,9 +81,8 @@
 #define AHCI_Global_Port_CAP_NCS(x)         (((x) & 0xF00) >> 8)
 
 #define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
-#ifdef DBG
-    #define AhciDebugPrint(format, ...) StorPortDebugPrint(0, format, __VA_ARGS__)
-#endif
+//#define AhciDebugPrint(format, ...) StorPortDebugPrint(0, format, __VA_ARGS__)
+#define AhciDebugPrint(format, ...) DbgPrint("(%s:%d) " format, __RELFILE__, __LINE__, ##__VA_ARGS__)
 
 typedef
 VOID
@@ -472,9 +476,9 @@ typedef struct _AHCI_PORT_EXTENSION
         LARGE_INTEGER MaxLba;
         ULONG BytesPerLogicalSector;
         ULONG BytesPerPhysicalSector;
-        // UCHAR VendorId[41];
-        // UCHAR RevisionID[9];
-        // UCHAR SerialNumber[21];
+        UCHAR VendorId[41];
+        UCHAR RevisionID[9];
+        UCHAR SerialNumber[21];
     } DeviceParams;
 
     STOR_DPC CommandCompletion;
@@ -565,6 +569,13 @@ typedef struct _AHCI_SRB_EXTENSION
 //                       Declarations                       //
 //////////////////////////////////////////////////////////////
 
+VOID
+AhciProcessIO (
+    __in PAHCI_ADAPTER_EXTENSION AdapterExtension,
+    __in UCHAR PathId,
+    __in PSCSI_REQUEST_BLOCK Srb
+    );
+
 BOOLEAN
 AhciAdapterReset (
     __in PAHCI_ADAPTER_EXTENSION AdapterExtension
@@ -584,6 +595,12 @@ IsPortValid (
     __in ULONG pathId
     );
 
+UCHAR DeviceRequestSense (
+    __in PAHCI_ADAPTER_EXTENSION AdapterExtension,
+    __in PSCSI_REQUEST_BLOCK Srb,
+    __in PCDB Cdb
+    );
+
 UCHAR DeviceRequestReadWrite (
     __in PAHCI_ADAPTER_EXTENSION AdapterExtension,
     __in PSCSI_REQUEST_BLOCK Srb,
@@ -603,6 +620,12 @@ DeviceInquiryRequest (
     __in PCDB Cdb
     );
 
+UCHAR DeviceRequestComplete (
+    __in PAHCI_ADAPTER_EXTENSION AdapterExtension,
+    __in PSCSI_REQUEST_BLOCK Srb,
+    __in PCDB Cdb
+    );
+
 UCHAR DeviceReportLuns (
     __in PAHCI_ADAPTER_EXTENSION AdapterExtension,
     __in PSCSI_REQUEST_BLOCK Srb,
@@ -631,7 +654,8 @@ GetSrbExtension(
 __inline
 ULONG64
 AhciGetLba (
-    __in PCDB Cdb
+    __in PCDB Cdb,
+    __in ULONG CdbLength
     );
 
 //////////////////////////////////////////////////////////////