From: Ruiyu Ni Date: Mon, 27 Nov 2017 01:13:51 +0000 (+0800) Subject: MdeModulePkg/AtaAtapiPassThru: Revert patch to disable Bus Master X-Git-Tag: edk2-stable201903~2994 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=0641808ece210dd2855a69302a0876af7bdc44a2;hp=dc32e820f02854b95ae806cdf3d87ae0d229a932 MdeModulePkg/AtaAtapiPassThru: Revert patch to disable Bus Master This patch caused Windows 10 S4 resume failure. Considering the similar changes are reverted from PciBus driver, revert the patch from AtaAtapiPassThru as well. Revert "MdeModulePkg/AtaAtapiPassThru: disable only BM-DMA at ExitBootServices()" This reverts commit 76fd5a660d704538a1b14a58d03a4eef9682b01c. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Reviewed-by: Laszlo Ersek Reviewed-by: Jiewen Yao Reviewed-by: Star Zeng --- diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c index e10e0d4e65..09064dda18 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c @@ -480,7 +480,8 @@ InitializeAtaAtapiPassThru ( } /** - Disable Bus Master DMA on the device when exiting the boot services. + Disable the device (especially Bus Master DMA) when exiting the boot + services. @param[in] Event Event for which this notification function is being called. @@ -505,7 +506,7 @@ AtaPassThruExitBootServices ( PciIo->Attributes ( PciIo, EfiPciIoAttributeOperationDisable, - Instance->EnabledPciAttributes & EFI_PCI_IO_ATTRIBUTE_BUS_MASTER, + Instance->EnabledPciAttributes, NULL ); } diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h index 92c5bf2001..8d6eac706c 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h @@ -123,7 +123,8 @@ typedef struct { LIST_ENTRY NonBlockingTaskList; // - // For disabling Bus Master DMA on the device at ExitBootServices(). + // For disabling the device (especially Bus Master DMA) at + // ExitBootServices(). // EFI_EVENT ExitBootEvent; } ATA_ATAPI_PASS_THRU_INSTANCE;