summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-29 03:14:37 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-29 03:14:37 +0000
commitde028a62ded3c0ab76d33accec4d8666cb2834bf (patch)
tree22d50aebc162b7eb2498d52bdc046516bbe0b095
parentbd1a4d1800dde72c2d75fd107fc1122a8709f09b (diff)
downloadedk2-platforms-de028a62ded3c0ab76d33accec4d8666cb2834bf.tar.xz
Fix a bug in DegradeResource().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9621 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c
index d6291b9375..d5f553bcc4 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c
@@ -1048,45 +1048,46 @@ DegradeResource (
)
{
PCI_IO_DEVICE *Temp;
- LIST_ENTRY *CurrentLink;
+ LIST_ENTRY *ChildDeviceLink;
+ LIST_ENTRY *ChildNodeLink;
PCI_RESOURCE_NODE *TempNode;
//
// If any child device has both option ROM and 64-bit BAR, degrade its PMEM64/MEM64
// requests in case that if a legacy option ROM image can not access 64-bit resources.
//
- CurrentLink = Bridge->ChildList.ForwardLink;
- while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {
- Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
+ ChildDeviceLink = Bridge->ChildList.ForwardLink;
+ while (ChildDeviceLink != NULL && ChildDeviceLink != &Bridge->ChildList) {
+ Temp = PCI_IO_DEVICE_FROM_LINK (ChildDeviceLink);
if (Temp->RomSize != 0) {
if (!IsListEmpty (&Mem64Node->ChildList)) {
- CurrentLink = Mem64Node->ChildList.ForwardLink;
- while (CurrentLink != &Mem64Node->ChildList) {
- TempNode = RESOURCE_NODE_FROM_LINK (CurrentLink);
+ ChildNodeLink = Mem64Node->ChildList.ForwardLink;
+ while (ChildNodeLink != &Mem64Node->ChildList) {
+ TempNode = RESOURCE_NODE_FROM_LINK (ChildNodeLink);
if (TempNode->PciDev == Temp) {
- RemoveEntryList (CurrentLink);
+ RemoveEntryList (ChildNodeLink);
InsertResourceNode (Mem32Node, TempNode);
}
- CurrentLink = TempNode->Link.ForwardLink;
+ ChildNodeLink = TempNode->Link.ForwardLink;
}
}
if (!IsListEmpty (&PMem64Node->ChildList)) {
- CurrentLink = PMem64Node->ChildList.ForwardLink;
- while (CurrentLink != &PMem64Node->ChildList) {
- TempNode = RESOURCE_NODE_FROM_LINK (CurrentLink);
+ ChildNodeLink = PMem64Node->ChildList.ForwardLink;
+ while (ChildNodeLink != &PMem64Node->ChildList) {
+ TempNode = RESOURCE_NODE_FROM_LINK (ChildNodeLink);
if (TempNode->PciDev == Temp) {
- RemoveEntryList (CurrentLink);
+ RemoveEntryList (ChildNodeLink);
InsertResourceNode (PMem32Node, TempNode);
}
- CurrentLink = TempNode->Link.ForwardLink;
+ ChildNodeLink = TempNode->Link.ForwardLink;
}
}
}
- CurrentLink = CurrentLink->ForwardLink;
+ ChildDeviceLink = ChildDeviceLink->ForwardLink;
}
//