Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pci-v6.17-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull pci fix from Bjorn Helgaas:

- Fix mvebu PCI enumeration regression caused by converting to
for_each_of_range() iterator (Klaus Kudielka)

* tag 'pci-v6.17-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
PCI: mvebu: Fix use of for_each_of_range() iterator

+4 -17
+4 -17
drivers/pci/controller/pci-mvebu.c
··· 1168 1168 return devm_ioremap_resource(&pdev->dev, &port->regs); 1169 1169 } 1170 1170 1171 - #define DT_FLAGS_TO_TYPE(flags) (((flags) >> 24) & 0x03) 1172 - #define DT_TYPE_IO 0x1 1173 - #define DT_TYPE_MEM32 0x2 1174 - #define DT_CPUADDR_TO_TARGET(cpuaddr) (((cpuaddr) >> 56) & 0xFF) 1175 - #define DT_CPUADDR_TO_ATTR(cpuaddr) (((cpuaddr) >> 48) & 0xFF) 1176 - 1177 1171 static int mvebu_get_tgt_attr(struct device_node *np, int devfn, 1178 1172 unsigned long type, 1179 1173 unsigned int *tgt, ··· 1183 1189 return -EINVAL; 1184 1190 1185 1191 for_each_of_range(&parser, &range) { 1186 - unsigned long rtype; 1187 1192 u32 slot = upper_32_bits(range.bus_addr); 1188 1193 1189 - if (DT_FLAGS_TO_TYPE(range.flags) == DT_TYPE_IO) 1190 - rtype = IORESOURCE_IO; 1191 - else if (DT_FLAGS_TO_TYPE(range.flags) == DT_TYPE_MEM32) 1192 - rtype = IORESOURCE_MEM; 1193 - else 1194 - continue; 1195 - 1196 - if (slot == PCI_SLOT(devfn) && type == rtype) { 1197 - *tgt = DT_CPUADDR_TO_TARGET(range.cpu_addr); 1198 - *attr = DT_CPUADDR_TO_ATTR(range.cpu_addr); 1194 + if (slot == PCI_SLOT(devfn) && 1195 + type == (range.flags & IORESOURCE_TYPE_BITS)) { 1196 + *tgt = (range.parent_bus_addr >> 56) & 0xFF; 1197 + *attr = (range.parent_bus_addr >> 48) & 0xFF; 1199 1198 return 0; 1200 1199 } 1201 1200 }