On Thu, Aug 25, 2016 at 9:56 PM, Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote: > On Thu, Aug 25, 2016 at 01:59:56PM +0800, Ley Foon Tan wrote: >> Altera PCIe IP can be configured as rootport or device and they might have >> same vendor ID. It will cause the system hang issue if Altera PCIe is in >> endpoint mode and work with other PCIe rootport that from other vendors. >> Moved retrain function to before pci_scan_root_bus and removed _FIXUP. >> Add _altera_pcie_cfg_read() and _altera_pcie_cfg_write() to use struct >> altera_pcie as argument instead of struct pci_bus. > > I think this makes sense. Can you split this into two patches: > > - Rework the config accessors > - Move retrain from the quirk to altera_pcie_host_init() Okay, will resend this. Thanks. > I also want to look through the other host bridge drivers and see if > there's any consistency in naming and structure of the config accessors. > The pattern of a wrapper that takes "struct pci_bus *, unsigned int devfn, > ..." that calls an internal function that takes the driver structure > instead of the "struct pci_bus *" might be useful in other drivers as well. -- 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