[UNIATA] Get back a ros diff spotted by Thomas and use our debug checks in some more...
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 14 Sep 2015 10:33:09 +0000 (10:33 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 14 Sep 2015 10:33:09 +0000 (10:33 +0000)
svn path=/trunk/; revision=69225

reactos/drivers/storage/ide/uniata/id_ata.cpp
reactos/drivers/storage/ide/uniata/id_sata.cpp
reactos/drivers/storage/ide/uniata/id_sata.h

index 64f111c..6079bbb 100644 (file)
@@ -8035,7 +8035,11 @@ default_no_prep:
             } else {
                 RtlZeroMemory(modeData, sizeof(MODE_POWER_CONDITION_PAGE));
                 modeData->PageCode = MODE_PAGE_POWER_CONDITION;
+#ifdef __REACTOS__
+                modeData->PageLength = sizeof(MODE_POWER_CONDITION_PAGE)-sizeof(MODE_PARAMETER_HEADER);
+#else
                 modeData->PageLength = sizeof(MODE_PAGE_POWER_CONDITION)-sizeof(MODE_PARAMETER_HEADER);
+#endif
                 modeData->Byte3.Fields.Idle = LunExt->PowerState <= StartStop_Power_Idle;
                 modeData->Byte3.Fields.Standby = LunExt->PowerState == StartStop_Power_Standby;
                 Srb->DataTransferLength = sizeof(MODE_POWER_CONDITION_PAGE);
index 38212b1..6651cc8 100644 (file)
@@ -2313,13 +2313,13 @@ UniataAhciEndTransaction(
         KdPrint2(("  Incomplete command, CI %#x, ACT %#x\n", CI, ACT));
         KdPrint2(("  FIS status %#x, error %#x\n", RCV_FIS[2], RCV_FIS[3]));
 
-#if DBG
+#ifdef _DEBUG
         UniataDumpAhciPortRegs(chan);
 #endif
         if(!UniataAhciAbortOperation(chan)) {
             KdPrint2(("  Abort failed, need RESET\n"));
         }
-#if DBG
+#ifdef _DEBUG
         UniataDumpAhciPortRegs(chan);
 #endif
         chan->AhciPrevCI = CI & ~((ULONG)1 << tag);
index 016dbff..f5c5af8 100644 (file)
@@ -123,7 +123,7 @@ UniataAhciInit(
     IN PVOID HwDeviceExtension
     );
 
-#if DBG
+#ifdef _DEBUG
 VOID
 NTAPI
 UniataDumpAhciPortRegs(