linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: rcar: Always allocate MSI addresses in 32bit space
@ 2020-10-16 12:04 marek.vasut
  2020-10-20  7:47 ` Geert Uytterhoeven
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: marek.vasut @ 2020-10-16 12:04 UTC (permalink / raw)
  To: linux-pci
  Cc: Marek Vasut, Bjorn Helgaas, Geert Uytterhoeven,
	Lorenzo Pieralisi, Wolfram Sang, Yoshihiro Shimoda,
	linux-renesas-soc

From: Marek Vasut <marek.vasut+renesas@gmail.com>

This fixes MSI operation on legacy PCI cards, which cannot issue 64bit MSIs.
The R-Car controller only has one MSI trigger address instead of two, one
for 64bit and one for 32bit MSI, set the address to 32bit PCIe space so that
legacy PCI cards can also trigger MSIs.

Fixes: 290c1fb35860 ("PCI: rcar: Add MSI support for PCIe")
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: linux-renesas-soc@vger.kernel.org
---
 drivers/pci/controller/pcie-rcar-host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c
index 1194d5f3341b..ac5c7d7573a6 100644
--- a/drivers/pci/controller/pcie-rcar-host.c
+++ b/drivers/pci/controller/pcie-rcar-host.c
@@ -753,7 +753,7 @@ static int rcar_pcie_enable_msi(struct rcar_pcie_host *host)
 	}
 
 	/* setup MSI data target */
-	msi->pages = __get_free_pages(GFP_KERNEL, 0);
+	msi->pages = __get_free_pages(GFP_KERNEL | GFP_DMA32, 0);
 	rcar_pcie_hw_enable_msi(host);
 
 	return 0;
-- 
2.28.0


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

end of thread, other threads:[~2021-01-15 12:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 12:04 [PATCH] PCI: rcar: Always allocate MSI addresses in 32bit space marek.vasut
2020-10-20  7:47 ` Geert Uytterhoeven
2020-10-25 15:37   ` Marek Vasut
2020-10-27 12:04 ` Yoshihiro Shimoda
2020-12-10 18:11 ` Lorenzo Pieralisi
2020-12-12 19:13   ` Marek Vasut
2020-12-14 16:08     ` Lorenzo Pieralisi
2020-12-16 17:49       ` Marek Vasut
2020-12-21 10:01         ` Lorenzo Pieralisi
2020-12-30 12:47           ` Marek Vasut
2021-01-04 12:21             ` Lorenzo Pieralisi
2021-01-15 12:12 ` 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).