diff options
author | Feng Tian <feng.tian@intel.com> | 2015-04-27 05:27:20 +0000 |
---|---|---|
committer | erictian <erictian@Edk2> | 2015-04-27 05:27:20 +0000 |
commit | 5956af2bbac6d977858cfecc5a9048dee29b7401 (patch) | |
tree | 80dc18fde5f451634548b423f61d78522fb8b290 /MdeModulePkg/Bus/Pci | |
parent | bbeacc5816fd474937dd35d44c91fbf24403c374 (diff) | |
download | edk2-5956af2bbac6d977858cfecc5a9048dee29b7401.zip edk2-5956af2bbac6d977858cfecc5a9048dee29b7401.tar.gz edk2-5956af2bbac6d977858cfecc5a9048dee29b7401.tar.bz2 |
MdeModulePkg: fix completed xfer length in XhciDxe and XhciPei drivers
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@17207 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci')
-rw-r--r-- | MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c index c353d49..8ff194e 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -1137,7 +1137,7 @@ XhcCheckUrbResult ( if ((TRBType == TRB_TYPE_DATA_STAGE) ||
(TRBType == TRB_TYPE_NORMAL) ||
(TRBType == TRB_TYPE_ISOCH)) {
- CheckedUrb->Completed += (CheckedUrb->DataLen - EvtTrb->Length);
+ CheckedUrb->Completed += (((TRANSFER_TRB_NORMAL*)TRBPtr)->Length - EvtTrb->Length);
}
break;
diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c index 8e768bc..14a5c0e 100644 --- a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c @@ -2,7 +2,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid
which is used to enable recovery function from USB Drivers.
-Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -659,7 +659,7 @@ XhcPeiCheckUrbResult ( if ((TRBType == TRB_TYPE_DATA_STAGE) ||
(TRBType == TRB_TYPE_NORMAL) ||
(TRBType == TRB_TYPE_ISOCH)) {
- CheckedUrb->Completed += (CheckedUrb->DataLen - EvtTrb->Length);
+ CheckedUrb->Completed += (((TRANSFER_TRB_NORMAL*)TRBPtr)->Length - EvtTrb->Length);
}
break;
|