SourceLevelDebugPkg/DebugCommunicationLibUsb3: Fix the completed transfer length

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17202 6f19259b-4bc3-4df7-8a09-765794883524
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 @@
       //

       // 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;

     }