Re: [PATCH] Rewrite pci_scan_slot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2009-12-13 at 08:10 -0500, Matthew Wilcox wrote:
> +static int only_one_child(struct pci_bus *bus)
> +{
> +       struct pci_dev *parent = bus->self;
> +       if (!parent || !pci_is_pcie(parent))
> +               return 0;
> +       if (parent->pcie_type == PCI_EXP_TYPE_ROOT_PORT ||
> +           parent->pcie_type == PCI_EXP_TYPE_DOWNSTREAM)
> +               return 1;
> +       return 0;
> +}
> +

This thing about only looking at dev 0 of children of root ports might
be fishy on the field.

Yes the spec says root ports should only have one child at 0 but I'm
pretty sure I've seen embedded SoCs that don't respect this (though
I can't give you a precise example off the top of my head, at least the
Apple seems to be kosher which is almost a surprise :-).

No objection to the patch for now but keep yourself ready for somebody
asking you for some kind of quirk here :-)

Cheers,
Ben.

--
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

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux