mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/XhciDxe: Usb legacy support feature is optional. For those usb 3.0 devices which doesn’t support this feature, should directly return and not touch corresponding registers
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sergey Isakov <isakov-sl@bk.ru> Signed-off-by: Tian, Feng <feng.tian@intel.com> Reviewed-by: Li, Elvin <elvin.li@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14776 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
6f05c02325
commit
74b04490da
|
@ -164,7 +164,7 @@ XhcReset (
|
|||
// Flow through, same behavior as Host Controller Reset
|
||||
//
|
||||
case EFI_USB_HC_RESET_HOST_CONTROLLER:
|
||||
if (((XhcReadExtCapReg (Xhc, Xhc->DebugCapSupOffset) & 0xFF) == XHC_CAP_USB_DEBUG) &&
|
||||
if ((Xhc->DebugCapSupOffset != 0xFFFFFFFF) && ((XhcReadExtCapReg (Xhc, Xhc->DebugCapSupOffset) & 0xFF) == XHC_CAP_USB_DEBUG) &&
|
||||
((XhcReadExtCapReg (Xhc, Xhc->DebugCapSupOffset + XHC_DC_DCCTRL) & BIT0) != 0)) {
|
||||
Status = EFI_SUCCESS;
|
||||
goto ON_EXIT;
|
||||
|
|
|
@ -543,6 +543,10 @@ XhcSetBiosOwnership (
|
|||
{
|
||||
UINT32 Buffer;
|
||||
|
||||
if (Xhc->UsbLegSupOffset == 0xFFFFFFFF) {
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "XhcSetBiosOwnership: called to set BIOS ownership\n"));
|
||||
|
||||
Buffer = XhcReadExtCapReg (Xhc, Xhc->UsbLegSupOffset);
|
||||
|
@ -563,6 +567,10 @@ XhcClearBiosOwnership (
|
|||
{
|
||||
UINT32 Buffer;
|
||||
|
||||
if (Xhc->UsbLegSupOffset == 0xFFFFFFFF) {
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "XhcClearBiosOwnership: called to clear BIOS ownership\n"));
|
||||
|
||||
Buffer = XhcReadExtCapReg (Xhc, Xhc->UsbLegSupOffset);
|
||||
|
@ -606,7 +614,7 @@ XhcGetCapabilityAddr (
|
|||
ExtCapOffset += (NextExtCapReg << 2);
|
||||
} while (NextExtCapReg != 0);
|
||||
|
||||
return 0;
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -676,7 +684,7 @@ XhcResetHC (
|
|||
}
|
||||
}
|
||||
|
||||
if (((XhcReadExtCapReg (Xhc, Xhc->DebugCapSupOffset) & 0xFF) != XHC_CAP_USB_DEBUG) ||
|
||||
if ((Xhc->DebugCapSupOffset == 0xFFFFFFFF) || ((XhcReadExtCapReg (Xhc, Xhc->DebugCapSupOffset) & 0xFF) != XHC_CAP_USB_DEBUG) ||
|
||||
((XhcReadExtCapReg (Xhc, Xhc->DebugCapSupOffset + XHC_DC_DCCTRL) & BIT0) == 0)) {
|
||||
XhcSetOpRegBit (Xhc, XHC_USBCMD_OFFSET, XHC_USBCMD_RESET);
|
||||
Status = XhcWaitOpRegBit (Xhc, XHC_USBCMD_OFFSET, XHC_USBCMD_RESET, FALSE, Timeout);
|
||||
|
|
Loading…
Reference in New Issue