Re: [Bug 219513] New: PCIe drivers do not bind

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

 



On 11/19/24 11:27, Manivannan Sadhasivam wrote:
> On Tue, Nov 19, 2024 at 10:57:26AM -0600, Dullfire wrote:
>>
>> Bart: I attached to the bug report a dts extracted from the system.
>>
>> Just a FYI: SPARC systems (including linux) get their device tree from the
>> open firmware, which likely dynamically generates at least parts of it, so
>> there is not a discrete source for it.
>>
> 
> Thanks Jonathan for the dts drop! Looks like the platform devices for the pcie
> nodes were created elsewhere for the SPARC systems. Could you please test the
> below diff and see if it fixes the issue?
> 
> ```
> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
> index 7a061cc860d5..e70f4c089cd4 100644
> --- a/drivers/pci/bus.c
> +++ b/drivers/pci/bus.c
> @@ -394,7 +394,7 @@ void pci_bus_add_device(struct pci_dev *dev)
>          * PCI client drivers.
>          */
>         pdev = of_find_device_by_node(dn);
> -       if (pdev) {
> +       if (pdev && of_pci_is_supply_present(dn)) {
>                 if (!device_link_add(&dev->dev, &pdev->dev,
>                                      DL_FLAG_AUTOREMOVE_CONSUMER))
>                         pci_err(dev, "failed to add device link between %s and %s\n",
> ```
> 
> - Mani


Mani: Yup, that patch does the trick in my test case. The PCIe drivers all bound
and function.


Regards,
Jonathan Currier




[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