public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ruiyu Ni <ruiyu.ni@intel.com>
To: edk2-devel@lists.01.org
Cc: Laszlo Ersek <lersek@redhat.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Star Zeng <star.zeng@intel.com>
Subject: [PATCH 1/2] MdeModulePkg/AtaAtapiPassThru: Revert patch to disable Bus Master
Date: Mon, 27 Nov 2017 09:19:47 +0800	[thread overview]
Message-ID: <20171127011948.279312-2-ruiyu.ni@intel.com> (raw)
In-Reply-To: <20171127011948.279312-1-ruiyu.ni@intel.com>

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 <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
---
 MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c | 5 +++--
 MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

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;
-- 
2.15.0.gvfs.1.preview.4



  reply	other threads:[~2017-11-27  1:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27  1:19 [PATCH 0/2] MdeModulePkg/AtaAtapiPassThru: Revert patch to disable PCI attributes Ruiyu Ni
2017-11-27  1:19 ` Ruiyu Ni [this message]
2017-11-27  1:19 ` [PATCH 2/2] " Ruiyu Ni
2017-11-27  4:20 ` [PATCH 0/2] " Yao, Jiewen
2017-11-27  5:18 ` Zeng, Star
2017-11-27 14:09 ` Laszlo Ersek
2017-11-28  7:39   ` Ni, Ruiyu
2017-11-28 12:55     ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171127011948.279312-2-ruiyu.ni@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox