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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user