diff options
author | Star Zeng <star.zeng@intel.com> | 2017-11-20 15:44:24 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2017-11-22 18:37:48 +0800 |
commit | c34a5aab53d2fd87204a00bb93cd41bb6dc4d15b (patch) | |
tree | edde5450487782f9d1920d6421e1dd90fbdac2d6 /MdeModulePkg/Bus/Pci/EhciPei | |
parent | a8035b908655afd59321173752b29970ae61601b (diff) | |
download | edk2-c34a5aab53d2fd87204a00bb93cd41bb6dc4d15b.tar.gz edk2-c34a5aab53d2fd87204a00bb93cd41bb6dc4d15b.tar.bz2 edk2-c34a5aab53d2fd87204a00bb93cd41bb6dc4d15b.zip |
MdeModulePkg EhciPei: Minor refinement about IOMMU
This patch is following 2c656af04d7f.
1. Fix typo "XHC" to "EHC".
2. Reinitialize Request(Phy/Map) and Data(Phy/Map)
in Urb, otherwise the last time value of them may
be used in error handling when error happens.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus/Pci/EhciPei')
-rw-r--r-- | MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h index 279407475b..715a5ab1c1 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h @@ -99,7 +99,7 @@ struct _PEI_USB2_HC_DEV { EDKII_IOMMU_PPI *IoMmu;
EFI_PEI_PPI_DESCRIPTOR PpiDescriptor;
//
- // EndOfPei callback is used to stop the XHC DMA operation
+ // EndOfPei callback is used to stop the EHC DMA operation
// after exit PEI phase.
//
EFI_PEI_NOTIFY_DESCRIPTOR EndOfPeiNotifyList;
diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c index 3dadcd60b6..baacf5d560 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c @@ -576,7 +576,12 @@ EhcCreateUrb ( if (Urb->Qh == NULL) {
goto ON_ERROR;
}
-
+
+ Urb->RequestPhy = NULL;
+ Urb->RequestMap = NULL;
+ Urb->DataPhy = NULL;
+ Urb->DataMap = NULL;
+
//
// Map the request and user data
//
@@ -591,9 +596,6 @@ EhcCreateUrb ( Urb->RequestPhy = (VOID *) ((UINTN) PhyAddr);
Urb->RequestMap = Map;
- } else {
- Urb->RequestPhy = NULL;
- Urb->RequestMap = NULL;
}
if (Data != NULL) {
@@ -613,9 +615,6 @@ EhcCreateUrb ( Urb->DataPhy = (VOID *) ((UINTN) PhyAddr);
Urb->DataMap = Map;
- } else {
- Urb->DataPhy = NULL;
- Urb->DataMap = NULL;
}
Status = EhcCreateQtds (Ehc, Urb);
|