PCI: of_property: Assign PCI instead of CPU bus address to dynamic PCI nodes
Subsystems (4)
PATCH 1/1 PCI: of_property: Assign PCI instead of CPU bus address to dynamic PCI nodes
When populating "ranges" property for a PCI bridge or endpoint, of_pci_prop_ranges() incorrectly use the CPU bus address of the resource. In such PCI nodes, the window should instead be in PCI address space. Call pci_bus_address() on the resource in order to obtain the PCI bus address.
---
This patch, originally preparatory for a bigger patchset (see [1]), has been splitted in a standalone one for better management and because it contains a bugfix which is probably of interest to stable branch.
drivers/pci/of_property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/of_property.c +1 -1
@@ -126,7 +126,7 @@ static int of_pci_prop_ranges(struct pci_dev *pdev, struct of_changeset *ocs,if (of_pci_get_addr_flags (&res[j], &flags))continue ; - val64 = res[j].start; + val64 =pci_bus_address (pdev, &res[j] - pdev->resource);of_pci_set_address (pdev, rp[i].parent_addr, val64,0 , flags, false);if (pci_is_bridge (pdev)) {
Signature · 1 line
2.35.3
Hi Andrea,
Quoted 11 lines · On Fri, 8 Nov 2024 10:42:56 +0100 Andrea della Porta <[email protected]>…
When populating "ranges" property for a PCI bridge or endpoint,
of_pci_prop_ranges()incorrectly use the CPU bus address of the resource. In such PCI nodes, the window should instead be in PCI address space. Callpci_bus_address()on the resource in order to obtain the PCI bus address.Fixes 407d1a51921e ("PCI: Create device tree node for bridge")Signed-off-by Andrea della Porta <[email protected]>Acked-by Bjorn Helgaas <[email protected]>Tested-by Herve Codina <[email protected]>
Quoted 4 lines
---
This patch, originally preparatory for a bigger patchset (see [1]), has been splitted in a standalone one for better management and because it contains a bugfix which is probably of interest to stable branch.
Nothing to say for the patch itself.
Just here, you mentioned "see [1]" but you didn't provide the link.
IMHO, this is not blocking for applying the patch but, just for other people looking at this email in the mailing list, can you reply providing the link?
Best regards,
Hervé
Hi herve,
Quoted 21 lines · Herve Codina
Hi Andrea,
Quoted 11 lines · On Fri, 8 Nov 2024 10:42:56 +0100 Andrea della Porta <[email protected]>…
When populating "ranges" property for a PCI bridge or endpoint,
of_pci_prop_ranges()incorrectly use the CPU bus address of the resource. In such PCI nodes, the window should instead be in PCI address space. Callpci_bus_address()on the resource in order to obtain the PCI bus address.Fixes 407d1a51921e ("PCI: Create device tree node for bridge")Signed-off-by Andrea della Porta <[email protected]>Acked-by Bjorn Helgaas <[email protected]>Tested-by Herve Codina <[email protected]>Quoted 4 lines
---
This patch, originally preparatory for a bigger patchset (see [1]), has been splitted in a standalone one for better management and because it contains a bugfix which is probably of interest to stable branch.
Quoted 6 lines
Nothing to say for the patch itself.
Just here, you mentioned "see [1]" but you didn't provide the link.
IMHO, this is not blocking for applying the patch but, just for other people looking at this email in the mailing list, can you reply providing the link?
Thanks for pointing that out, sorry about that. Here it is:
Many thanks,
Andrea
Quoted 3 lines
Best regards,
Hervé
Hi,
Quoted 26 lines · Andrea della Porta
Hi herve,
Quoted 23 lines · Herve Codina
Hi Andrea,
Quoted 11 lines · On Fri, 8 Nov 2024 10:42:56 +0100 Andrea della Porta <[email protected]>…
When populating "ranges" property for a PCI bridge or endpoint,
of_pci_prop_ranges()incorrectly use the CPU bus address of the resource. In such PCI nodes, the window should instead be in PCI address space. Callpci_bus_address()on the resource in order to obtain the PCI bus address.Fixes 407d1a51921e ("PCI: Create device tree node for bridge")Signed-off-by Andrea della Porta <[email protected]>Acked-by Bjorn Helgaas <[email protected]>Tested-by Herve Codina <[email protected]>Quoted 4 lines
---
This patch, originally preparatory for a bigger patchset (see [1]), has been splitted in a standalone one for better management and because it contains a bugfix which is probably of interest to stable branch.Nothing to say for the patch itself.
Quoted 8 lines
Quoted 4 lines
Just here, you mentioned "see [1]" but you didn't provide the link.
IMHO, this is not blocking for applying the patch but, just for other people looking at this email in the mailing list, can you reply providing the link?
Thanks for pointing that out, sorry about that. Here it is:
Do I have to resubmit the patch with the referenced url fixed or is it ok as it is?
Thanks,
Andrea
Quoted 7 lines
Many thanks,
AndreaQuoted 3 lines
Best regards,
Hervé
Hi Andrea,
Quoted 34 lines · On Thu, 14 Nov 2024 16:26:42 +0100 Andrea della Porta <[email protected]>…
Hi,
Quoted 31 lines · Andrea della Porta
Hi herve,
Quoted 27 lines · Herve Codina
Hi Andrea,
Quoted 11 lines · On Fri, 8 Nov 2024 10:42:56 +0100 Andrea della Porta <[email protected]>…
When populating "ranges" property for a PCI bridge or endpoint,
of_pci_prop_ranges()incorrectly use the CPU bus address of the resource. In such PCI nodes, the window should instead be in PCI address space. Callpci_bus_address()on the resource in order to obtain the PCI bus address.Fixes 407d1a51921e ("PCI: Create device tree node for bridge")Signed-off-by Andrea della Porta <[email protected]>Acked-by Bjorn Helgaas <[email protected]>Tested-by Herve Codina <[email protected]>Quoted 4 lines
---
This patch, originally preparatory for a bigger patchset (see [1]), has been splitted in a standalone one for better management and because it contains a bugfix which is probably of interest to stable branch.Nothing to say for the patch itself.
Just here, you mentioned "see [1]" but you didn't provide the link.
IMHO, this is not blocking for applying the patch but, just for other people looking at this email in the mailing list, can you reply providing the link?
Quoted 6 lines
Quoted 3 lines
Thanks for pointing that out, sorry about that. Here it is:
Do I have to resubmit the patch with the referenced url fixed or is it ok as it is?
This reference is after the '---' marker line and so will not be present in the changelog once the patch is applied.
For this reason, I don't think you have to resubmit the patch.
If you need to resubmit the patch for any other reasons (resent because the patch was applied, modification needed, ...) resubmit it with the referenced url fixed.
Best regards,
Hervé
Bjorn Helgaas
AppliedQuoted 11 lines · Andrea della Porta
When populating "ranges" property for a PCI bridge or endpoint,
of_pci_prop_ranges()incorrectly use the CPU bus address of the resource. In such PCI nodes, the window should instead be in PCI address space. Callpci_bus_address()on the resource in order to obtain the PCI bus address.Fixes 407d1a51921e ("PCI: Create device tree node for bridge")Signed-off-by Andrea della Porta <[email protected]>Acked-by Bjorn Helgaas <[email protected]>Tested-by Herve Codina <[email protected]>
I picked this up on pci/of for v6.13, thanks! Rob, let me know if you'd prefer to take it or ack/review it.
Quoted 24 lines
---
This patch, originally preparatory for a bigger patchset (see [1]), has been splitted in a standalone one for better management and because it contains a bugfix which is probably of interest to stable branch.drivers/pci/of_property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/of_property.c +1
-1@@ -126,7 +126,7 @@ static int of_pci_prop_ranges(struct pci_dev *pdev, struct of_changeset *ocs,if (of_pci_get_addr_flags (&res[j], &flags))continue ; - val64 = res[j].start; + val64 =pci_bus_address (pdev, &res[j] - pdev->resource);of_pci_set_address (pdev, rp[i].parent_addr, val64,0 , flags, false);if (pci_is_bridge (pdev)) {Signature · 1 line
2.35.3