linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c
@ 2021-03-17 13:15 Kishon Vijay Abraham I
  2021-03-19  4:45 ` Krzysztof Wilczyński
  2021-03-22 14:48 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 3+ messages in thread
From: Kishon Vijay Abraham I @ 2021-03-17 13:15 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Bjorn Helgaas, Jonathan Corbet, Rob Herring
  Cc: Kishon Vijay Abraham I, linux-pci, linux-kernel,
	linux-arm-kernel, Lokesh Vutla, stable

Both TI's AM65x (K3) and TI's K2 PCIe driver are implemented in
pci-keystone. However Only K2 PCIe driver should use it's own pci_ops
for configuration space accesses. But commit 10a797c6e54a
("PCI: dwc: keystone: Use pci_ops for config space accessors") used
custom pci_ops for both AM65x and K2. This breaks configuration space
access for AM65x platform. Fix it here.

Fixes: 10a797c6e54a ("PCI: dwc: keystone: Use pci_ops for config space accessors")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Cc: <stable@vger.kernel.org> # v5.10
---
 drivers/pci/controller/dwc/pci-keystone.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c
index 53aa35cb3a49..a59ecbec601f 100644
--- a/drivers/pci/controller/dwc/pci-keystone.c
+++ b/drivers/pci/controller/dwc/pci-keystone.c
@@ -798,7 +798,8 @@ static int __init ks_pcie_host_init(struct pcie_port *pp)
 	int ret;
 
 	pp->bridge->ops = &ks_pcie_ops;
-	pp->bridge->child_ops = &ks_child_pcie_ops;
+	if (!ks_pcie->is_am6)
+		pp->bridge->child_ops = &ks_child_pcie_ops;
 
 	ret = ks_pcie_config_legacy_irq(ks_pcie);
 	if (ret)
-- 
2.17.1


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

* Re: [PATCH] PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c
  2021-03-17 13:15 [PATCH] PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c Kishon Vijay Abraham I
@ 2021-03-19  4:45 ` Krzysztof Wilczyński
  2021-03-22 14:48 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Wilczyński @ 2021-03-19  4:45 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Lorenzo Pieralisi, Bjorn Helgaas, Jonathan Corbet, Rob Herring,
	linux-pci, linux-kernel, linux-arm-kernel, Lokesh Vutla, stable

Hi Kishon,

Thank you for the fix!

[...]
> @@ -798,7 +798,8 @@ static int __init ks_pcie_host_init(struct pcie_port *pp)
>  	int ret;
>  
>  	pp->bridge->ops = &ks_pcie_ops;
> -	pp->bridge->child_ops = &ks_child_pcie_ops;
> +	if (!ks_pcie->is_am6)
> +		pp->bridge->child_ops = &ks_child_pcie_ops;
>  
>  	ret = ks_pcie_config_legacy_irq(ks_pcie);
>  	if (ret)
[...]

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

Krzysztof

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

* Re: [PATCH] PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c
  2021-03-17 13:15 [PATCH] PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c Kishon Vijay Abraham I
  2021-03-19  4:45 ` Krzysztof Wilczyński
@ 2021-03-22 14:48 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2021-03-22 14:48 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Rob Herring, Jonathan Corbet, Bjorn Helgaas
  Cc: Lorenzo Pieralisi, linux-pci, linux-kernel, stable, Lokesh Vutla,
	linux-arm-kernel

On Wed, 17 Mar 2021 18:45:18 +0530, Kishon Vijay Abraham I wrote:
> Both TI's AM65x (K3) and TI's K2 PCIe driver are implemented in
> pci-keystone. However Only K2 PCIe driver should use it's own pci_ops
> for configuration space accesses. But commit 10a797c6e54a
> ("PCI: dwc: keystone: Use pci_ops for config space accessors") used
> custom pci_ops for both AM65x and K2. This breaks configuration space
> access for AM65x platform. Fix it here.

Applied to pci/dwc, thanks!

[1/1] PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c
      https://git.kernel.org/lpieralisi/pci/c/3d0b2a3a87

Thanks,
Lorenzo

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

end of thread, other threads:[~2021-03-22 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 13:15 [PATCH] PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c Kishon Vijay Abraham I
2021-03-19  4:45 ` Krzysztof Wilczyński
2021-03-22 14:48 ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).