Index: /trunk/src/VBox/Devices/Storage/DevATA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 66056)
+++ /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 66057)
@@ -2161,13 +2161,10 @@
         if (s->uTxDir == PDMMEDIATXDIR_FROM_DEVICE)
         {
-            Assert(cbTransfer <= s->cbAtapiPassthroughTransfer);
             /*
              * Reply with the same amount of data as the real drive
              * but only if the command wasn't split.
              */
-# if 0  /// @todo This destroys commands where cbTotalTransfer > cbIOBuffer
-            if (s->cbElementaryTransfer < s->cbIOBuffer)
+            if (s->cbAtapiPassthroughTransfer < s->cbIOBuffer)
                 s->cbTotalTransfer = cbTransfer;
-# endif
 
             if (   s->aATAPICmd[0] == SCSI_INQUIRY
@@ -2190,6 +2187,8 @@
          * transfer size. But the I/O buffer size limits what can actually be
          * done in one transfer, so set the actual value of the buffer end. */
-        s->cbElementaryTransfer = cbTransfer;
-        if (cbTransfer >= s->cbAtapiPassthroughTransfer)
+        Assert(cbTransfer <= s->cbAtapiPassthroughTransfer);
+        s->cbElementaryTransfer        = cbTransfer;
+        s->cbAtapiPassthroughTransfer -= cbTransfer;
+        if (!s->cbAtapiPassthroughTransfer)
         {
             s->iSourceSink = ATAFN_SS_NULL;
