lkml.org 
[lkml]   [2021]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.11 482/775] PCI: rcar: Always allocate MSI addresses in 32bit space
    Date
    From: Marek Vasut <marek.vasut+renesas@gmail.com>

    [ Upstream commit c4e0fec2f7ee013dbf86445394ff47f719408f99 ]

    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.

    Link: https://lore.kernel.org/r/20201016120431.7062-1-marek.vasut@gmail.com
    Fixes: 290c1fb35860 ("PCI: rcar: Add MSI support for PCIe")
    Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
    Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
    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
    Signed-off-by: Sasha Levin <sashal@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 4d1c4b24e5370..a728e8f9ad3c8 100644
    --- a/drivers/pci/controller/pcie-rcar-host.c
    +++ b/drivers/pci/controller/pcie-rcar-host.c
    @@ -735,7 +735,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.27.0


    \
     
     \ /
      Last update: 2021-03-02 05:10    [W:4.065 / U:0.172 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site