summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
diff options
context:
space:
mode:
authorElvin Li <elvin.li@intel.com>2013-08-21 03:46:01 +0000
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2013-08-21 03:46:01 +0000
commit260fbf5340dc330ddd84c1358ed2b6bff74f61c0 (patch)
treecebdb78c2ef059cc2cb2faed1ea45cb312ca23f8 /MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
parentc0a3c3da98cef6286a509eb685a4ff5375f8347b (diff)
downloadedk2-platforms-260fbf5340dc330ddd84c1358ed2b6bff74f61c0.tar.xz
Remove several ASSERT in XhciDxe to allow error status happen then do error handling.
Signed-off-by: Elvin Li <elvin.li@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14574 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c')
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
index 239fa96a66..3e578975ad 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
@@ -900,7 +900,9 @@ XhcControlTransfer (
Status = EFI_SUCCESS;
} else if (*TransferResult == EFI_USB_ERR_STALL) {
RecoveryStatus = XhcRecoverHaltedEndpoint(Xhc, Urb);
- ASSERT_EFI_ERROR (RecoveryStatus);
+ if (EFI_ERROR (RecoveryStatus)) {
+ DEBUG ((EFI_D_ERROR, "XhcControlTransfer: XhcRecoverHaltedEndpoint failed\n"));
+ }
Status = EFI_DEVICE_ERROR;
goto FREE_URB;
} else {
@@ -947,7 +949,6 @@ XhcControlTransfer (
} else {
Status = XhcEvaluateContext64 (Xhc, SlotId, MaxPacket0);
}
- ASSERT_EFI_ERROR (Status);
} else if (DescriptorType == USB_DESC_TYPE_CONFIG) {
ASSERT (Data != NULL);
if (*DataLength == ((UINT16 *)Data)[1]) {
@@ -983,7 +984,6 @@ XhcControlTransfer (
} else {
Status = XhcConfigHubContext64 (Xhc, SlotId, HubDesc->NumPorts, TTT, MTT);
}
- ASSERT_EFI_ERROR (Status);
}
} else if ((Request->Request == USB_REQ_SET_CONFIG) &&
(Request->RequestType == USB_REQUEST_TYPE (EfiUsbNoData, USB_REQ_TYPE_STANDARD, USB_TARGET_DEVICE))) {
@@ -997,7 +997,6 @@ XhcControlTransfer (
} else {
Status = XhcSetConfigCmd64 (Xhc, SlotId, DeviceSpeed, Xhc->UsbDevContext[SlotId].ConfDesc[Index]);
}
- ASSERT_EFI_ERROR (Status);
break;
}
}
@@ -1192,7 +1191,9 @@ XhcBulkTransfer (
Status = EFI_SUCCESS;
} else if (*TransferResult == EFI_USB_ERR_STALL) {
RecoveryStatus = XhcRecoverHaltedEndpoint(Xhc, Urb);
- ASSERT_EFI_ERROR (RecoveryStatus);
+ if (EFI_ERROR (RecoveryStatus)) {
+ DEBUG ((EFI_D_ERROR, "XhcBulkTransfer: XhcRecoverHaltedEndpoint failed\n"));
+ }
Status = EFI_DEVICE_ERROR;
}
@@ -1491,7 +1492,9 @@ XhcSyncInterruptTransfer (
Status = EFI_SUCCESS;
} else if (*TransferResult == EFI_USB_ERR_STALL) {
RecoveryStatus = XhcRecoverHaltedEndpoint(Xhc, Urb);
- ASSERT_EFI_ERROR (RecoveryStatus);
+ if (EFI_ERROR (RecoveryStatus)) {
+ DEBUG ((EFI_D_ERROR, "XhcSyncInterruptTransfer: XhcRecoverHaltedEndpoint failed\n"));
+ }
Status = EFI_DEVICE_ERROR;
}