mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-22 21:24:35 +02:00
MdeModulePkg/Bus/Pci/XhciDxe: Reset port if status change returns an error
Force resetting the port by clearing the USB_PORT_STAT_C_RESET bit in PortChangeStatus when XhcPollPortStatusChange fails Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
89c5d90003
commit
992d5451d1
@ -471,7 +471,16 @@ XhcGetRootHubPortStatus (
|
|||||||
// For those devices behind hub, we get its attach/detach event by hooking Get_Port_Status request at control transfer for those hub.
|
// For those devices behind hub, we get its attach/detach event by hooking Get_Port_Status request at control transfer for those hub.
|
||||||
//
|
//
|
||||||
ParentRouteChart.Dword = 0;
|
ParentRouteChart.Dword = 0;
|
||||||
XhcPollPortStatusChange (Xhc, ParentRouteChart, PortNumber, PortStatus);
|
Status = XhcPollPortStatusChange (Xhc, ParentRouteChart, PortNumber, PortStatus);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Force resetting the port by clearing the USB_PORT_STAT_C_RESET bit in PortChangeStatus
|
||||||
|
// when XhcPollPortStatusChange fails
|
||||||
|
//
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
PortStatus->PortChangeStatus &= ~(USB_PORT_STAT_C_RESET);
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user