aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2018-05-14 21:16:31 +0800
committerHaojian Zhuang <haojian.zhuang@linaro.org>2018-05-14 21:19:14 +0800
commit6e37588be846f4df68b805e1c627270a294e2f6a (patch)
tree1b6292c6762e8d96086aec2b7fcf18a3da14bf2b
parent824ee28b5a9025475d7c2a7dfb4843c8c56b0c33 (diff)
downloadOpenPlatformPkg-6e37588be846f4df68b805e1c627270a294e2f6a.tar.gz
Drivers/DwUsbDxe: fix hang in fastboot boot command
When execute "fastboot boot boot.img" for several times on HiKey platform, it may hang in downloading process. This issue only exists in release build. After allocating memory with zero value assigned, this issue is gone. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
-rw-r--r--Drivers/Usb/DwUsbDxe/DwUsbDxe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Drivers/Usb/DwUsbDxe/DwUsbDxe.c b/Drivers/Usb/DwUsbDxe/DwUsbDxe.c
index ee67624..191cfea 100644
--- a/Drivers/Usb/DwUsbDxe/DwUsbDxe.c
+++ b/Drivers/Usb/DwUsbDxe/DwUsbDxe.c
@@ -197,7 +197,7 @@ EpRx (
RxDescBytes = Len;
}
- RxBuf = AllocatePool (DATA_SIZE);
+ RxBuf = AllocateZeroPool (DATA_SIZE);
ASSERT (RxBuf != NULL);
InvalidateDataCacheRange (RxBuf, Len);