//\r
DestroyDeviceInfoList (Instance);\r
\r
+ PciIo = Instance->PciIo;\r
+\r
+ //\r
+ // Disable this ATA host controller.\r
+ //\r
+ PciIo->Attributes (\r
+ PciIo,\r
+ EfiPciIoAttributeOperationDisable,\r
+ Instance->EnabledPciAttributes,\r
+ NULL\r
+ );\r
+\r
//\r
// If the current working mode is AHCI mode, then pre-allocated resource\r
// for AHCI initialization should be released.\r
//\r
- PciIo = Instance->PciIo;\r
-\r
if (Instance->Mode == EfiAtaAhciMode) {\r
AhciRegisters = &Instance->AhciRegisters;\r
PciIo->Unmap (\r
);\r
}\r
\r
- //\r
- // Disable this ATA host controller.\r
- //\r
- PciIo->Attributes (\r
- PciIo,\r
- EfiPciIoAttributeOperationDisable,\r
- Instance->EnabledPciAttributes,\r
- NULL\r
- );\r
-\r
//\r
// Restore original PCI attributes\r
//\r