]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Transfer.c
SourceLevelDebugPkg DebugUsb3: Re-Fix GCC build failures
[mirror_edk2.git] / SourceLevelDebugPkg / Library / DebugCommunicationLibUsb3 / DebugCommunicationLibUsb3Transfer.c
index 773a7bd9c57ef8b61cdd90d11fad38cabea1f34e..1b6645bd1c6d422be1ce56cec58d92364cbe9fdd 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Debug Port Library implementation based on usb3 debug port.\r
 \r
-  Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -145,11 +145,9 @@ XhcCheckNewEvent (
   )\r
 {\r
   EFI_STATUS          Status;\r
-  TRB_TEMPLATE        *EvtTrb;\r
 \r
   ASSERT (EvtRing != NULL);\r
 \r
-  EvtTrb     = (TRB_TEMPLATE *)(UINTN) EvtRing->EventRingDequeue;\r
   *NewEvtTrb = (TRB_TEMPLATE *)(UINTN) EvtRing->EventRingDequeue;\r
 \r
   if (EvtRing->EventRingDequeue == EvtRing->EventRingEnqueue) {\r
@@ -277,7 +275,7 @@ XhcCheckUrbResult (
       //\r
       // The length of data which were transferred.\r
       //\r
-      CheckedUrb->Completed += (CheckedUrb->DataLen - EvtTrb->Length);\r
+      CheckedUrb->Completed += (((TRANSFER_TRB_NORMAL*)TRBPtr)->Length - EvtTrb->Length);\r
     } else {\r
       CheckedUrb->Result  |= EFI_USB_ERR_TIMEOUT;\r
     }\r