]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/AtaAtapiPassThru: Revert patch to disable PCI attributes
authorRuiyu Ni <ruiyu.ni@intel.com>
Mon, 27 Nov 2017 01:17:24 +0000 (09:17 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 29 Nov 2017 01:02:46 +0000 (09:02 +0800)
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 the device
at ExitBootServices()"

This reverts commit 6fb8ddd36bde45614b0a069528cdc97077835a74.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h

index 09064dda18b70753d6a100ad21e9855c90291e78..a48b295d26aad4182641887eac68d5f74ebb1d3b 100644 (file)
@@ -104,8 +104,7 @@ ATA_ATAPI_PASS_THRU_INSTANCE gAtaAtapiPassThruInstanceTemplate = {
   {                   // NonBlocking TaskList\r
     NULL,\r
     NULL\r
-  },\r
-  NULL,               // ExitBootEvent\r
+  }\r
 };\r
 \r
 ATAPI_DEVICE_PATH    mAtapiDevicePathTemplate = {\r
@@ -479,38 +478,6 @@ InitializeAtaAtapiPassThru (
   return Status;\r
 }\r
 \r
-/**\r
-  Disable the device (especially Bus Master DMA) when exiting the boot\r
-  services.\r
-\r
-  @param[in] Event    Event for which this notification function is being\r
-                      called.\r
-  @param[in] Context  Pointer to the ATA_ATAPI_PASS_THRU_INSTANCE that\r
-                      represents the HBA.\r
-**/\r
-VOID\r
-EFIAPI\r
-AtaPassThruExitBootServices (\r
-  IN EFI_EVENT Event,\r
-  IN VOID      *Context\r
-  )\r
-{\r
-  ATA_ATAPI_PASS_THRU_INSTANCE *Instance;\r
-  EFI_PCI_IO_PROTOCOL          *PciIo;\r
-\r
-  DEBUG ((DEBUG_VERBOSE, "%a: Context=0x%p\n", __FUNCTION__, Context));\r
-\r
-  Instance = Context;\r
-  PciIo = Instance->PciIo;\r
-\r
-  PciIo->Attributes (\r
-           PciIo,\r
-           EfiPciIoAttributeOperationDisable,\r
-           Instance->EnabledPciAttributes,\r
-           NULL\r
-           );\r
-}\r
-\r
 /**\r
   Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
@@ -790,17 +757,6 @@ AtaAtapiPassThruStart (
   InitializeListHead(&Instance->DeviceList);\r
   InitializeListHead(&Instance->NonBlockingTaskList);\r
 \r
-  Status = gBS->CreateEvent (\r
-                  EVT_SIGNAL_EXIT_BOOT_SERVICES,\r
-                  TPL_CALLBACK,\r
-                  AtaPassThruExitBootServices,\r
-                  Instance,\r
-                  &Instance->ExitBootEvent\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    goto ErrorExit;\r
-  }\r
-\r
   Instance->TimerEvent = NULL;\r
 \r
   Status = gBS->CreateEvent (\r
@@ -854,10 +810,6 @@ ErrorExit:
     gBS->CloseEvent (Instance->TimerEvent);\r
   }\r
 \r
-  if ((Instance != NULL) && (Instance->ExitBootEvent != NULL)) {\r
-    gBS->CloseEvent (Instance->ExitBootEvent);\r
-  }\r
-\r
   //\r
   // Remove all inserted ATA devices.\r
   //\r
@@ -956,15 +908,6 @@ AtaAtapiPassThruStop (
     Instance->TimerEvent = NULL;\r
   }\r
   DestroyAsynTaskList (Instance, FALSE);\r
-\r
-  //\r
-  // Close event signaled at gBS->ExitBootServices().\r
-  //\r
-  if (Instance->ExitBootEvent != NULL) {\r
-    gBS->CloseEvent (Instance->ExitBootEvent);\r
-    Instance->ExitBootEvent = NULL;\r
-  }\r
-\r
   //\r
   // Free allocated resource\r
   //\r
index 8d6eac706c0b7a4294d19b1a80e806ef0f07732e..85e5a555395347966015fb10f0e9aa45cef1a268 100644 (file)
@@ -121,12 +121,6 @@ typedef struct {
   //\r
   EFI_EVENT                         TimerEvent;\r
   LIST_ENTRY                        NonBlockingTaskList;\r
-\r
-  //\r
-  // For disabling the device (especially Bus Master DMA) at\r
-  // ExitBootServices().\r
-  //\r
-  EFI_EVENT                         ExitBootEvent;\r
 } ATA_ATAPI_PASS_THRU_INSTANCE;\r
 \r
 //\r