UINT16 ControlBlockBaseAddr;\r
UINTN DataSize;\r
IDE_BUS_DRIVER_PRIVATE_DATA *IdeBusDriverPrivateData;\r
+ UINT64 Supports;\r
\r
//\r
// Local variables declaration for IdeControllerInit support\r
\r
Status = PciIo->Attributes (\r
PciIo,\r
- EfiPciIoAttributeOperationEnable,\r
- EFI_PCI_DEVICE_ENABLE,\r
- NULL\r
+ EfiPciIoAttributeOperationSupported,\r
+ 0,\r
+ &Supports\r
);\r
+ if (!EFI_ERROR (Status)) {\r
+ Supports &= EFI_PCI_DEVICE_ENABLE;\r
+ Status = PciIo->Attributes (\r
+ PciIo,\r
+ EfiPciIoAttributeOperationEnable,\r
+ Supports,\r
+ NULL\r
+ );\r
+ }\r
+\r
if (EFI_ERROR (Status)) {\r
goto ErrorExit;\r
}\r
BOOLEAN AllChildrenStopped;\r
UINTN Index;\r
IDE_BUS_DRIVER_PRIVATE_DATA *IdeBusDriverPrivateData;\r
+ UINT64 Supports;\r
\r
IdeBusDriverPrivateData = NULL;\r
\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
);\r
if (!EFI_ERROR (Status)) {\r
- PciIo->Attributes (\r
- PciIo,\r
- EfiPciIoAttributeOperationDisable,\r
- EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO | EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO | EFI_PCI_DEVICE_ENABLE,\r
- NULL\r
- );\r
+ Status = PciIo->Attributes (\r
+ PciIo,\r
+ EfiPciIoAttributeOperationSupported,\r
+ 0,\r
+ &Supports\r
+ );\r
+ if (!EFI_ERROR (Status)) {\r
+ Supports &= EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO | EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO | EFI_PCI_DEVICE_ENABLE;\r
+ PciIo->Attributes (\r
+ PciIo,\r
+ EfiPciIoAttributeOperationDisable,\r
+ Supports,\r
+ NULL\r
+ );\r
+ }\r
}\r
\r
gBS->OpenProtocol (\r