On 14.01.2016 16:36, Mark Salter wrote:
+extern struct pci_mcfg_fixup __start_acpi_mcfg_fixups[];I think this would be better as:
>+extern struct pci_mcfg_fixup __end_acpi_mcfg_fixups[];
>+
>+static struct pci_ops *pci_mcfg_check_quirks(struct acpi_pci_root *root)
>+{
>+ struct pci_mcfg_fixup *f;
>+ int bus_num = root->secondary.start;
>+ int domain = root->segment;
>+
>+ /*
>+ * First match against PCI topology <domain:bus> then use DMI or
>+ * custom match handler.
>+ */
>+ for (f = __start_acpi_mcfg_fixups; f < __end_acpi_mcfg_fixups; f++) {
>+ if ((f->domain == domain || f->domain == PCI_MCFG_DOMAIN_ANY) &&
>+ (f->bus_num == bus_num || f->bus_num == PCI_MCFG_BUS_ANY) &&
>+ (f->system ? dmi_check_system(f->system) : 0 ||
>+ f->match ? f->match(f, root) : 0))
>+ return f->ops;
(f->system ? dmi_check_system(f->system) : 1 &&
f->match ? f->match(f, root) : 1))
return f->ops;
Otherwise, one has to call dmi_check_system() from f->match() if
access to root is needed.
Makes a lot of sense to me, I will modify as you suggested.
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
.