All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Bug 219513] New: PCIe drivers do not bind
       [not found] <bug-219513-41252@https.bugzilla.kernel.org/>
@ 2024-11-19 14:04 ` Bjorn Helgaas
  2024-11-19 14:16   ` Bartosz Golaszewski
  2024-11-19 17:17   ` Dullfire
  0 siblings, 2 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2024-11-19 14:04 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Bartosz Golaszewski
  Cc: Krzysztof Wilczyński, dullfire, linux-pci

On Tue, Nov 19, 2024 at 12:55:36PM +0000, bugzilla-daemon@kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=219513
> 
>           Hardware: Sparc64
>           Priority: P3
>           Reporter: dullfire@yahoo.com
>         Regression: No
> 
> Created attachment 307241
>   --> https://bugzilla.kernel.org/attachment.cgi?id=307241&action=edit
> debug info (some shell commands to check the PCIe devices and drivers)
> 
> In linux-next (next-20241118), since
> commit 03cfe0e05650 ("PCI/pwrctl: Ensure that the pwrctl drivers are probed
> before the PCI client drivers")
> PCIe drivers no longer bind (at least on the tested SPARCv9 system).
> 
> It appears a "supplier" devlink is created, however it is are dormant. see
> attached "bug-info.txt"

Thanks for the report.  It sounds like you bisected this to
03cfe0e05650?  Can you attach a complete dmesg log to the bugzilla?

This commit is queued for v6.13, and the merge window is now open, so
if it's a regression, we need to resolve it or drop it ASAP.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bug 219513] New: PCIe drivers do not bind
  2024-11-19 14:04 ` [Bug 219513] New: PCIe drivers do not bind Bjorn Helgaas
@ 2024-11-19 14:16   ` Bartosz Golaszewski
  2024-11-19 16:57     ` Dullfire
  2024-11-19 17:17   ` Dullfire
  1 sibling, 1 reply; 6+ messages in thread
From: Bartosz Golaszewski @ 2024-11-19 14:16 UTC (permalink / raw)
  To: dullfire
  Cc: Manivannan Sadhasivam, Krzysztof Wilczyński, linux-pci,
	Bjorn Helgaas

On Tue, 19 Nov 2024 at 15:04, Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> On Tue, Nov 19, 2024 at 12:55:36PM +0000, bugzilla-daemon@kernel.org wrote:
> > https://bugzilla.kernel.org/show_bug.cgi?id=219513
> >
> >           Hardware: Sparc64
> >           Priority: P3
> >           Reporter: dullfire@yahoo.com
> >         Regression: No
> >
> > Created attachment 307241
> >   --> https://bugzilla.kernel.org/attachment.cgi?id=307241&action=edit
> > debug info (some shell commands to check the PCIe devices and drivers)
> >
> > In linux-next (next-20241118), since
> > commit 03cfe0e05650 ("PCI/pwrctl: Ensure that the pwrctl drivers are probed
> > before the PCI client drivers")
> > PCIe drivers no longer bind (at least on the tested SPARCv9 system).
> >
> > It appears a "supplier" devlink is created, however it is are dormant. see
> > attached "bug-info.txt"
>
> Thanks for the report.  It sounds like you bisected this to
> 03cfe0e05650?  Can you attach a complete dmesg log to the bugzilla?
>
> This commit is queued for v6.13, and the merge window is now open, so
> if it's a regression, we need to resolve it or drop it ASAP.

Dullfire: is the DTS for this platform publicly available? If not, can
you at least post the PCI host controller and all its children nodes
here?

Bart

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bug 219513] New: PCIe drivers do not bind
  2024-11-19 14:16   ` Bartosz Golaszewski
@ 2024-11-19 16:57     ` Dullfire
  2024-11-19 17:27       ` Manivannan Sadhasivam
  0 siblings, 1 reply; 6+ messages in thread
From: Dullfire @ 2024-11-19 16:57 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Manivannan Sadhasivam, Krzysztof Wilczyński, linux-pci,
	Bjorn Helgaas



On 11/19/24 08:16, Bartosz Golaszewski wrote:
> On Tue, 19 Nov 2024 at 15:04, Bjorn Helgaas <helgaas@kernel.org> wrote:
>>
>> On Tue, Nov 19, 2024 at 12:55:36PM +0000, bugzilla-daemon@kernel.org wrote:
>>> https://bugzilla.kernel.org/show_bug.cgi?id=219513
>>>
>>>           Hardware: Sparc64
>>>           Priority: P3
>>>           Reporter: dullfire@yahoo.com
>>>         Regression: No
>>>
>>> Created attachment 307241
>>>   --> https://bugzilla.kernel.org/attachment.cgi?id=307241&action=edit
>>> debug info (some shell commands to check the PCIe devices and drivers)
>>>
>>> In linux-next (next-20241118), since
>>> commit 03cfe0e05650 ("PCI/pwrctl: Ensure that the pwrctl drivers are probed
>>> before the PCI client drivers")
>>> PCIe drivers no longer bind (at least on the tested SPARCv9 system).
>>>
>>> It appears a "supplier" devlink is created, however it is are dormant. see
>>> attached "bug-info.txt"
>>
>> Thanks for the report.  It sounds like you bisected this to
>> 03cfe0e05650?  Can you attach a complete dmesg log to the bugzilla?
>>
>> This commit is queued for v6.13, and the merge window is now open, so
>> if it's a regression, we need to resolve it or drop it ASAP.
> 
> Dullfire: is the DTS for this platform publicly available? If not, can
> you at least post the PCI host controller and all its children nodes
> here?
> 
> Bart

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.

Regards,
Jonathan Currier

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bug 219513] New: PCIe drivers do not bind
  2024-11-19 14:04 ` [Bug 219513] New: PCIe drivers do not bind Bjorn Helgaas
  2024-11-19 14:16   ` Bartosz Golaszewski
@ 2024-11-19 17:17   ` Dullfire
  1 sibling, 0 replies; 6+ messages in thread
From: Dullfire @ 2024-11-19 17:17 UTC (permalink / raw)
  To: Bjorn Helgaas, Manivannan Sadhasivam, Bartosz Golaszewski
  Cc: Krzysztof Wilczyński, linux-pci



On 11/19/24 08:04, Bjorn Helgaas wrote:
> On Tue, Nov 19, 2024 at 12:55:36PM +0000, bugzilla-daemon@kernel.org wrote:
>> https://bugzilla.kernel.org/show_bug.cgi?id=219513
>>
>>           Hardware: Sparc64
>>           Priority: P3
>>           Reporter: dullfire@yahoo.com
>>         Regression: No
>>
>> Created attachment 307241
>>   --> https://bugzilla.kernel.org/attachment.cgi?id=307241&action=edit
>> debug info (some shell commands to check the PCIe devices and drivers)
>>
>> In linux-next (next-20241118), since
>> commit 03cfe0e05650 ("PCI/pwrctl: Ensure that the pwrctl drivers are probed
>> before the PCI client drivers")
>> PCIe drivers no longer bind (at least on the tested SPARCv9 system).
>>
>> It appears a "supplier" devlink is created, however it is are dormant. see
>> attached "bug-info.txt"
> 
> Thanks for the report.  It sounds like you bisected this to
> 03cfe0e05650?  Can you attach a complete dmesg log to the bugzilla?
Yes, a bisect pointed at 03cfe0e05650. After finding that I tried the patch below
to verify, since a trivial revert wasn't possible on next-20241118, and the PCIe
drivers started binding again, and everything seemed functional.

diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index b0e3cfdaa276..6d87773784b9 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -404,7 +404,7 @@ void pci_bus_add_device(struct pci_dev *dev)
         * PCI client drivers.
         */
        pdev = of_find_device_by_node(dn);
-       if (pdev) {
+       if (pdev && false) {
                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",

Obviously not a fix, but it did help verify the issue.
> 
> This commit is queued for v6.13, and the merge window is now open, so
> if it's a regression, we need to resolve it or drop it ASAP.

Regards,
Jonathan Currier

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Bug 219513] New: PCIe drivers do not bind
  2024-11-19 16:57     ` Dullfire
@ 2024-11-19 17:27       ` Manivannan Sadhasivam
  2024-11-19 17:48         ` Dullfire
  0 siblings, 1 reply; 6+ messages in thread
From: Manivannan Sadhasivam @ 2024-11-19 17:27 UTC (permalink / raw)
  To: Dullfire
  Cc: Bartosz Golaszewski, Krzysztof Wilczyński, linux-pci,
	Bjorn Helgaas

On Tue, Nov 19, 2024 at 10:57:26AM -0600, Dullfire wrote:
> 
> 
> On 11/19/24 08:16, Bartosz Golaszewski wrote:
> > On Tue, 19 Nov 2024 at 15:04, Bjorn Helgaas <helgaas@kernel.org> wrote:
> >>
> >> On Tue, Nov 19, 2024 at 12:55:36PM +0000, bugzilla-daemon@kernel.org wrote:
> >>> https://bugzilla.kernel.org/show_bug.cgi?id=219513
> >>>
> >>>           Hardware: Sparc64
> >>>           Priority: P3
> >>>           Reporter: dullfire@yahoo.com
> >>>         Regression: No
> >>>
> >>> Created attachment 307241
> >>>   --> https://bugzilla.kernel.org/attachment.cgi?id=307241&action=edit
> >>> debug info (some shell commands to check the PCIe devices and drivers)
> >>>
> >>> In linux-next (next-20241118), since
> >>> commit 03cfe0e05650 ("PCI/pwrctl: Ensure that the pwrctl drivers are probed
> >>> before the PCI client drivers")
> >>> PCIe drivers no longer bind (at least on the tested SPARCv9 system).
> >>>
> >>> It appears a "supplier" devlink is created, however it is are dormant. see
> >>> attached "bug-info.txt"
> >>
> >> Thanks for the report.  It sounds like you bisected this to
> >> 03cfe0e05650?  Can you attach a complete dmesg log to the bugzilla?
> >>
> >> This commit is queued for v6.13, and the merge window is now open, so
> >> if it's a regression, we need to resolve it or drop it ASAP.
> > 
> > Dullfire: is the DTS for this platform publicly available? If not, can
> > you at least post the PCI host controller and all its children nodes
> > here?
> > 
> > Bart
> 
> 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

> Regards,
> Jonathan Currier

-- 
மணிவண்ணன் சதாசிவம்

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Bug 219513] New: PCIe drivers do not bind
  2024-11-19 17:27       ` Manivannan Sadhasivam
@ 2024-11-19 17:48         ` Dullfire
  0 siblings, 0 replies; 6+ messages in thread
From: Dullfire @ 2024-11-19 17:48 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Bartosz Golaszewski, Krzysztof Wilczyński, linux-pci,
	Bjorn Helgaas


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-11-19 18:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <bug-219513-41252@https.bugzilla.kernel.org/>
2024-11-19 14:04 ` [Bug 219513] New: PCIe drivers do not bind Bjorn Helgaas
2024-11-19 14:16   ` Bartosz Golaszewski
2024-11-19 16:57     ` Dullfire
2024-11-19 17:27       ` Manivannan Sadhasivam
2024-11-19 17:48         ` Dullfire
2024-11-19 17:17   ` Dullfire

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.