-/**@file\r
+/**@ file\r
This module provide support function for hot plug device.\r
\r
Copyright (c) 2006, Intel Corporation \r
/**\r
Compare two device path\r
\r
- @param DevicePath1 the first device path want to be compared\r
- @param DevicePath2 the first device path want to be compared\r
+ @param DevicePath1 the first device path want to be compared.\r
+ @param DevicePath2 the first device path want to be compared.\r
\r
- @retval TRUE equal\r
- @retval FALSE different\r
+ @retval TRUE equal.\r
+ @retval FALSE different.\r
**/\r
BOOLEAN\r
EfiCompareDevicePath (\r
/**\r
Test whether device path is for root pci hot plug bus\r
\r
- @param HpbdevicePath tested device path\r
+ @param HpbdevicePath tested device path.\r
@param HpIndex Return the index of root hot plug in global array.\r
\r
- @retval TRUE device path is for root pci hot plug\r
- @retval FALSE device path is not for root pci hot plug\r
+ @retval TRUE device path is for root pci hot plug.\r
+ @retval FALSE device path is not for root pci hot plug.\r
**/\r
BOOLEAN\r
IsRootPciHotPlugBus (\r
/**\r
Test whether device path is for root pci hot plug controller\r
\r
- @param HpbdevicePath tested device path\r
+ @param HpbdevicePath tested device path.\r
@param HpIndex Return the index of root hot plug in global array.\r
\r
- @retval TRUE device path is for root pci hot plug controller\r
- @retval FALSE device path is not for root pci hot plug controller\r
+ @retval TRUE device path is for root pci hot plug controller.\r
+ @retval FALSE device path is not for root pci hot plug controller.\r
**/\r
BOOLEAN\r
IsRootPciHotPlugController (\r
/**\r
Wrapper for creating event object for HPC \r
\r
- @param HpIndex index of hot plug device in global array\r
- @param Event event object\r
+ @param HpIndex index of hot plug device in global array.\r
+ @param Event event object.\r
\r
- @return status of create event invoken\r
+ @return status of create event invoken.\r
**/\r
EFI_STATUS\r
CreateEventForHpc (\r
/**\r
Wait for all root HPC initialized.\r
\r
- @param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization\r
+ @param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization.\r
**/\r
EFI_STATUS\r
AllRootHPCInitialized (\r
\r
Delay--;\r
\r
- } while (Delay);\r
+ } while (Delay > 0);\r
\r
return EFI_TIMEOUT;\r
}\r
/**\r
Check HPC capability register block\r
\r
- @param PciIoDevice PCI device instance\r
+ @param PciIoDevice PCI device instance.\r
\r
- @retval EFI_SUCCESS PCI device is HPC\r
- @retval EFI_NOT_FOUND PCI device is not HPC\r
+ @retval EFI_SUCCESS PCI device is HPC.\r
+ @retval EFI_NOT_FOUND PCI device is not HPC.\r
**/\r
EFI_STATUS\r
IsSHPC (\r
EFI_STATUS Status;\r
UINT8 Offset;\r
\r
- if (!PciIoDevice) {\r
+ if (PciIoDevice == NULL) {\r
return EFI_NOT_FOUND;\r
}\r
\r
return Status;\r
}\r
\r
- if ((State & EFI_HPC_STATE_ENABLED) && (State & EFI_HPC_STATE_INITIALIZED)) {\r
+ if ((State & EFI_HPC_STATE_ENABLED) != 0 && (State & EFI_HPC_STATE_INITIALIZED) != 0) {\r
PciIoDevice->ResourcePaddingDescriptors = Descriptors;\r
PciIoDevice->PaddingAttributes = Attributes;\r
}\r
/**\r
Test whether PCI device is hot plug bus.\r
\r
- @param PciIoDevice PCI device instance\r
+ @param PciIoDevice PCI device instance.\r
\r
- @retval EFI_SUCCESS PCI device is hot plug bus\r
- @retval EFI_NOT_FOUND PCI device is not hot plug bus\r
+ @retval EFI_SUCCESS PCI device is hot plug bus.\r
+ @retval EFI_NOT_FOUND PCI device is not hot plug bus.\r
**/\r
EFI_STATUS\r
IsPciHotPlugBus (\r