diff options
Diffstat (limited to 'util/autoport')
-rw-r--r-- | util/autoport/main.go | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/util/autoport/main.go b/util/autoport/main.go index 8a3ee6c83e..3b085152c5 100644 --- a/util/autoport/main.go +++ b/util/autoport/main.go @@ -277,34 +277,6 @@ func MatchDev(dev *DevTreeNode) { } for _, slot := range dev.PCISlots { - slotChip, ok := unmatchedPCIChips[slot.PCIAddr] - - if !ok { - continue - } - - if slot.additionalComment != "" && slotChip.Comment != "" { - slotChip.Comment = slot.additionalComment + " " + slotChip.Comment - } else { - slotChip.Comment = slot.additionalComment + slotChip.Comment - } - - delete(unmatchedPCIChips, slot.PCIAddr) - MatchDev(&slotChip) - dev.Children = append(dev.Children, slotChip) - } - - if dev.PCIController { - for slot, slotDev := range unmatchedPCIChips { - if slot.Bus == dev.ChildPCIBus { - delete(unmatchedPCIChips, slot) - MatchDev(&slotDev) - dev.Children = append(dev.Children, slotDev) - } - } - } - - for _, slot := range dev.PCISlots { slotDev, ok := unmatchedPCIDevices[slot.PCIAddr] if !ok { if slot.writeEmpty { @@ -334,6 +306,34 @@ func MatchDev(dev *DevTreeNode) { delete(unmatchedPCIDevices, slot.PCIAddr) } + for _, slot := range dev.PCISlots { + slotChip, ok := unmatchedPCIChips[slot.PCIAddr] + + if !ok { + continue + } + + if slot.additionalComment != "" && slotChip.Comment != "" { + slotChip.Comment = slot.additionalComment + " " + slotChip.Comment + } else { + slotChip.Comment = slot.additionalComment + slotChip.Comment + } + + delete(unmatchedPCIChips, slot.PCIAddr) + MatchDev(&slotChip) + dev.Children = append(dev.Children, slotChip) + } + + if dev.PCIController { + for slot, slotDev := range unmatchedPCIChips { + if slot.Bus == dev.ChildPCIBus { + delete(unmatchedPCIChips, slot) + MatchDev(&slotDev) + dev.Children = append(dev.Children, slotDev) + } + } + } + if dev.MissingParent != "" { for _, child := range MissingChildren[dev.MissingParent] { MatchDev(&child) |