mirror of https://github.com/acidanthera/audk.git
MdeModulePkg: Solve boot hang Xhci driver when use USB DVD with empty disk
Signed-off-by: likun su <sulikun@loongson.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: lichao <lichao@loongson.cn> Acked-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
ef05145136
commit
01ad4134c3
|
@ -171,7 +171,6 @@ XhcCreateUrb (
|
|||
Urb->Context = Context;
|
||||
|
||||
Status = XhcCreateTransferTrb (Xhc, Urb);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "XhcCreateUrb: XhcCreateTransferTrb Failed, Status = %r\n", Status));
|
||||
FreePool (Urb);
|
||||
|
@ -247,7 +246,11 @@ XhcCreateTransferTrb (
|
|||
|
||||
Dci = XhcEndpointToDci (Urb->Ep.EpAddr, (UINT8)(Urb->Ep.Direction));
|
||||
ASSERT (Dci < 32);
|
||||
EPRing = (TRANSFER_RING *)(UINTN)Xhc->UsbDevContext[SlotId].EndpointTransferRing[Dci-1];
|
||||
EPRing = (TRANSFER_RING *)(UINTN)Xhc->UsbDevContext[SlotId].EndpointTransferRing[Dci-1];
|
||||
if (EPRing == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
Urb->Ring = EPRing;
|
||||
OutputContext = Xhc->UsbDevContext[SlotId].OutputContext;
|
||||
if (Xhc->HcCParams.Data.Csz == 0) {
|
||||
|
|
Loading…
Reference in New Issue