From 20db8e2e38764a6bafdc18393f71d537c3d482b9 Mon Sep 17 00:00:00 2001
From: eric_tian <feng.tian@intel.com>
Date: Wed, 22 Apr 2015 14:01:36 +0800
Subject: [PATCH 1/3] SourceLevelDebugPkg/DebugCommunicationLibUsb3: fix
 completed xfer length

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
---
 .../DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Transfer.c       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Transfer.c b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Transfer.c
index 773a7bd..dbff493 100644
--- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Transfer.c
+++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Transfer.c
@@ -277,7 +277,7 @@ XhcCheckUrbResult (
       //
       // The length of data which were transferred.
       //
-      CheckedUrb->Completed += (CheckedUrb->DataLen - EvtTrb->Length);
+      CheckedUrb->Completed += (((TRANSFER_TRB_NORMAL*)TRBPtr)->Length - EvtTrb->Length);
     } else {
       CheckedUrb->Result  |= EFI_USB_ERR_TIMEOUT;
     }
-- 
1.9.5.msysgit.0

