diff -ruN v45a7\chglog.txt v45b\chglog.txt
--- v45a7\chglog.txt	Tue Mar 11 12:24:42 2014
+++ v45b\chglog.txt	Wed Aug 13 21:58:28 2014
@@ -620,13 +620,13 @@
 --
 2014.03.08 - v0.45a
 
-*) added SIS 0183 controller
+*) added "SIS 0183" controller
 !) fixed handler for SIS 018x SATA controllers without BAR4
 
 --
 2014.03.08 - v0.45a1
 
-*) added SIS 1182 and 1183 controllers
+*) added "SIS 1182" and "SIS 1183" controllers
 
 --
 2014.03.09 - v0.45a2
@@ -649,3 +649,34 @@
 
 !) fixed bug with not updated uniata_ver.h when VER is specified
 *) added more logs in and around AtapiVirtToPhysAddr_()
+
+--
+2014.05.21 - v0.45a4
+
+!) fixed bug with PCI device revision for UDMA-5 "SiS 630S" (improper detection)
+
+--
+2014.05.21 - v0.45a5
+
+*) added "SiS 962" and "SiS 963" to list of known devices,
+   programming specific flags are properly set for them.
+*) added more logs for flags and word-count in ISR
+
+--
+2014.08.05 - v0.45a6
+
+e) ATAPI commands READ_CD and READ_CD_MFS are marked as DMA-capable.
+   Managed by registry option AtapiDmaRawRead.
+
+--
+2014.08.11 - v0.45a7
+
+*) Added workaround for "Marvell 9123" detection of AHCI channels.
+   Chip reports 8 while it actually has 4.
+*) added more logs for SSD and AHCI channel detection.
+
+--
+2014.08.13 - v0.45a8
+
+e) do not touch unimplemented AHCI channels in AtapiResetController()
+*) added logging to UniataAhciChanImplemented()
\ No newline at end of file
diff -ruN v45a7\driver\config.h v45b\driver\config.h
--- v45a7\driver\config.h	Sat Jul 14 10:44:02 2012
+++ v45b\driver\config.h	Wed Aug 13 22:05:30 2014
@@ -43,6 +43,7 @@
 /***************************************/
 
 //#define UNIATA_DUMP_ATAPI
+#define UNIATA_DUMP_RW
 
 /***************************************/
 // Optimization for uni-processor machines
diff -ruN v45a7\driver\Dist\2K\uata_2k.inf v45b\driver\Dist\2K\uata_2k.inf
--- v45a7\driver\Dist\2K\uata_2k.inf	Tue Aug 12 01:32:14 2014
+++ v45b\driver\Dist\2K\uata_2k.inf	Sat Sep 06 14:43:36 2014
@@ -6,7 +6,7 @@
 ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
 Class=SCSIAdapter
 CatalogFile=uniata.cat
-DriverVer=08/12/2014,0.45.1.7
+DriverVer=09/06/2014,0.45.2.0
 
 ;
 ; Source file information
diff -ruN v45a7\driver\Dist\2K\uata_2kh.inf v45b\driver\Dist\2K\uata_2kh.inf
--- v45a7\driver\Dist\2K\uata_2kh.inf	Tue Aug 12 01:32:14 2014
+++ v45b\driver\Dist\2K\uata_2kh.inf	Sat Sep 06 14:43:36 2014
@@ -6,7 +6,7 @@
 ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
 Class=hdc
 CatalogFile=uniata.cat
-DriverVer=08/12/2014,0.45.1.7
+DriverVer=09/06/2014,0.45.2.0
 
 ;
 ; Source file information
diff -ruN v45a7\driver\Dist\2K\uniata_w2k.reg v45b\driver\Dist\2K\uniata_w2k.reg
--- v45a7\driver\Dist\2K\uniata_w2k.reg	Tue Aug 12 01:32:14 2014
+++ v45b\driver\Dist\2K\uniata_w2k.reg	Sat Sep 06 14:43:36 2014
@@ -6,7 +6,7 @@
 "Start"=dword:00000000
 "Tag"=dword:00000019
 "Type"=dword:00000001
-"DisplayName"="Universal BusMaster SATA/ATA/ATAPI Driver v0.45.1.7"
+"DisplayName"="Universal BusMaster SATA/ATA/ATAPI Driver v0.45.2.0"
 "ImagePath"=hex(2):53,79,73,74,65,6d,33,32,5c,44,52,49,56,45,52,53,5c,75,6e,69,\
   61,74,61,2e,73,79,73,00
 
diff -ruN v45a7\driver\Dist\NT4\uata_nt4.inf v45b\driver\Dist\NT4\uata_nt4.inf
--- v45a7\driver\Dist\NT4\uata_nt4.inf	Tue Aug 12 01:32:14 2014
+++ v45b\driver\Dist\NT4\uata_nt4.inf	Sat Sep 06 14:43:36 2014
@@ -6,7 +6,7 @@
 ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
 Class=SCSIAdapter
 CatalogFile=uniata.cat
-DriverVer=08/12/2014,0.45.1.7
+DriverVer=09/06/2014,0.45.2.0
 
 ;
 ; Source file information
Binary files v45a7\driver\Dist\tools\build_inf.exe and v45b\driver\Dist\tools\build_inf.exe differ
diff -ruN v45a7\driver\Dist\XP\uata_xp.inf v45b\driver\Dist\XP\uata_xp.inf
--- v45a7\driver\Dist\XP\uata_xp.inf	Tue Aug 12 01:32:14 2014
+++ v45b\driver\Dist\XP\uata_xp.inf	Sat Sep 06 14:43:36 2014
@@ -6,7 +6,7 @@
 ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
 Class=SCSIAdapter
 CatalogFile=uniata.cat
-DriverVer=08/12/2014,0.45.1.7
+DriverVer=09/06/2014,0.45.2.0
 
 ;
 ; Source file information
diff -ruN v45a7\driver\Dist\XP\uata_xph.inf v45b\driver\Dist\XP\uata_xph.inf
--- v45a7\driver\Dist\XP\uata_xph.inf	Tue Aug 12 01:32:14 2014
+++ v45b\driver\Dist\XP\uata_xph.inf	Sat Sep 06 14:43:36 2014
@@ -6,7 +6,7 @@
 ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
 Class=hdc
 CatalogFile=uniata.cat
-DriverVer=08/12/2014,0.45.1.7
+DriverVer=09/06/2014,0.45.2.0
 
 ;
 ; Source file information
diff -ruN v45a7\driver\id_ata.cpp v45b\driver\id_ata.cpp
--- v45a7\driver\id_ata.cpp	Tue Aug 12 01:13:20 2014
+++ v45b\driver\id_ata.cpp	Sat Sep 06 14:43:10 2014
@@ -1692,7 +1692,7 @@
                 deviceExtension->FullIdentifyData.NVCache_Version
                 ));
 
-        KdPrint2((PRINT_PREFIX "R-rate %#x\n",
+        KdPrint2((PRINT_PREFIX "R-rate %d\n",
                 deviceExtension->FullIdentifyData.NominalMediaRotationRate
                 ));
 
@@ -2262,6 +2262,7 @@
                 UniataAhciReset(HwDeviceExtension, j);
             } else {
                 KdPrint2((PRINT_PREFIX "  skip not implemented\n"));
+                continue;
             }
         } else {
             KdPrint2((PRINT_PREFIX "  ATA path, chan %#x\n", chan));
@@ -5070,9 +5071,9 @@
                     if(AtaReq->retry < MAX_RETRIES) {
 //fallback_pio:
                         if(!(deviceExtension->HwFlags & UNIATA_AHCI)) {
-                            AtaReq->Flags &= ~REQ_FLAG_DMA_OPERATION;
+                            //AtaReq->Flags &= ~REQ_FLAG_DMA_OPERATION;
+                            // Downrate will happen in AtapiDmaReinit(), try UDMA-2 for HDD only
                             AtaReq->Flags |= REQ_FLAG_FORCE_DOWNRATE;
-//                        LunExt->DeviceFlags |= DFLAGS_FORCE_DOWNRATE;
                         }
                         AtaReq->ReqState = REQ_STATE_QUEUED;
                         goto reenqueue_req;
@@ -5092,6 +5093,7 @@
                ((error >> 4) == SCSI_SENSE_HARDWARE_ERROR)) {
                 if(AtaReq->retry < MAX_RETRIES) {
 //fallback_pio:
+                    // Downrate will happen in AtapiDmaReinit(), use PIO immediately for ATAPI
                     AtaReq->Flags &= ~REQ_FLAG_DMA_OPERATION;
                     AtaReq->Flags |= REQ_FLAG_FORCE_DOWNRATE;
 //                        LunExt->DeviceFlags |= DFLAGS_FORCE_DOWNRATE;
@@ -5448,6 +5450,7 @@
             chan->ChannelCtrlFlags &= ~CTRFLAGS_DMA_OPERATION;
             goto CompleteRequest;
         }
+continue_read_drq:
         // Ensure that this is a read command.
         if (srb->SrbFlags & SRB_FLAGS_DATA_IN) {
 
@@ -5488,7 +5491,6 @@
                         }
                     }
                 }
-
             } else {
                 KdPrint2((PRINT_PREFIX 
                           "IdeIntr: Read %#x Dwords\n", wordCount/2));
@@ -5580,6 +5582,12 @@
                     status = SRB_STATUS_SUCCESS;
                     goto CompleteRequest;
                 }
+            } else {
+                if(!atapiDev && !DataOverrun && (srb->SrbFlags & SRB_FLAGS_DATA_IN) &&
+                    (statusByte == (IDE_STATUS_IDLE | IDE_STATUS_DRQ))) {
+                    KdPrint2((PRINT_PREFIX "  HDD read data ready \n"));
+                    goto continue_read_drq;
+                }
             }
         }
 
@@ -6688,6 +6696,7 @@
     // Adjust buffer address and words left count.
     AtaReq->WordsLeft -= wordCount;
     AtaReq->DataBuffer += wordCount;
+    AtaReq->WordsTransfered += wordCount;
 
     // Wait for interrupt.
     return SRB_STATUS_PENDING;
diff -ruN v45a7\driver\id_sata.cpp v45b\driver\id_sata.cpp
--- v45a7\driver\id_sata.cpp	Tue Aug 12 00:37:10 2014
+++ v45b\driver\id_sata.cpp	Thu Aug 14 14:57:12 2014
@@ -645,9 +645,7 @@
     PHW_CHANNEL chan;
     ULONG offs;
     ULONG BaseMemAddress;
-#ifdef DBG
     ULONG PI;
-#endif //DBG
     ULONG CAP;
     ULONG CAP2;
     ULONG BOHC;
@@ -757,11 +755,12 @@
     if(CAP & AHCI_CAP_SAM) {
         KdPrint2((PRINT_PREFIX "  AHCI legasy SATA\n"));
     }
-#ifdef DBG
+
     /* get the number of HW channels */
     PI = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_PI);
+    deviceExtension->AHCI_PI = PI;
     KdPrint2((PRINT_PREFIX "  AHCI PI %#x\n", PI));
-#endif //DBG
+
     CAP2 = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_CAP2);
     if(CAP2 & AHCI_CAP2_BOH) {
         KdPrint2((PRINT_PREFIX "  retry BOHC\n"));
@@ -969,6 +968,12 @@
     KdPrint2((PRINT_PREFIX "\n"));
 
     /* get the number of HW channels */
+    
+    /* CAP.NOP sometimes indicate the index of the last enabled
+     * port, at other times, that of the last possible port, so
+     * determining the maximum port number requires looking at
+     * both CAP.NOP and PI.
+     */
     PI = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_PI);
     deviceExtension->AHCI_PI = PI;
     KdPrint2((PRINT_PREFIX "  AHCI PI %#x\n", PI));
diff -ruN v45a7\driver\id_sata.h v45b\driver\id_sata.h
--- v45a7\driver\id_sata.h	Mon Aug 20 10:17:06 2012
+++ v45b\driver\id_sata.h	Wed Aug 13 21:52:56 2014
@@ -407,8 +407,18 @@
     IN ULONG Length = 0
     );
 
-#define UniataAhciChanImplemented(deviceExtension, c) \
-    (((deviceExtension)->AHCI_PI) & (1 << c))
+__inline
+BOOLEAN
+UniataAhciChanImplemented(
+    IN PHW_DEVICE_EXTENSION deviceExtension,
+    IN ULONG c
+    )
+{
+#ifdef DBG
+    KdPrint2((PRINT_PREFIX "imp: %#x & %#x\n", (deviceExtension)->AHCI_PI, (1<<c) ));
+#endif
+    return (((deviceExtension)->AHCI_PI) & ((ULONG)1 << c)) ? TRUE : FALSE;
+} // end UniataAhciChanImplemented()
 
 
 #endif //__UNIATA_SATA__H__
diff -ruN v45a7\driver\uniata_ver.h v45b\driver\uniata_ver.h
--- v45a7\driver\uniata_ver.h	Tue Aug 12 01:32:04 2014
+++ v45b\driver\uniata_ver.h	Sat Sep 06 14:43:26 2014
@@ -1,10 +1,10 @@
-#define UNIATA_VER_STR         "45a7"
-#define UNIATA_VER_DOT         0.45.1.7
+#define UNIATA_VER_STR         "45b"
+#define UNIATA_VER_DOT         0.45.2.0
 #define UNIATA_VER_MJ          0
 #define UNIATA_VER_MN          45
-#define UNIATA_VER_SUB_MJ      1
-#define UNIATA_VER_SUB_MN      7
-#define UNIATA_VER_DOT_COMMA   0,45,1,7
-#define UNIATA_VER_DOT_STR     "0.45.1.7"
+#define UNIATA_VER_SUB_MJ      2
+#define UNIATA_VER_SUB_MN      0
+#define UNIATA_VER_DOT_COMMA   0,45,2,0
+#define UNIATA_VER_DOT_STR     "0.45.2.0"
 #define UNIATA_VER_YEAR        2014
 #define UNIATA_VER_YEAR_STR    "2014"
