Patch "PCI: dwc: Do not remap invalid res" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PCI: dwc: Do not remap invalid res

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-dwc-do-not-remap-invalid-res.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b711eba342a4123837e5695fd5bdf2d44f0980cb
Author: Tim Harvey <tharvey@xxxxxxxxxxxxx>
Date:   Mon Nov 1 11:02:43 2021 -0700

    PCI: dwc: Do not remap invalid res
    
    [ Upstream commit 6e5ebc96ec651b67131f816d7e3bf286c635e749 ]
    
    On imx6 and perhaps others when pcie probes you get a:
    imx6q-pcie 33800000.pcie: invalid resource
    
    This occurs because the atu is not specified in the DT and as such it
    should not be remapped.
    
    Link: https://lore.kernel.org/r/20211101180243.23761-1-tharvey@xxxxxxxxxxxxx
    Fixes: 281f1f99cf3a ("PCI: dwc: Detect number of iATU windows")
    Signed-off-by: Tim Harvey <tharvey@xxxxxxxxxxxxx>
    Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
    Reviewed-by: Rob Herring <robh@xxxxxxxxxx>
    Acked-by: Richard Zhu <hongxing.zhu@xxxxxxx>
    Cc: Richard Zhu <hongxing.zhu@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
index a945f0c0e73dc..3254f60d1713f 100644
--- a/drivers/pci/controller/dwc/pcie-designware.c
+++ b/drivers/pci/controller/dwc/pcie-designware.c
@@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)
 		if (!pci->atu_base) {
 			struct resource *res =
 				platform_get_resource_byname(pdev, IORESOURCE_MEM, "atu");
-			if (res)
+			if (res) {
 				pci->atu_size = resource_size(res);
-			pci->atu_base = devm_ioremap_resource(dev, res);
-			if (IS_ERR(pci->atu_base))
+				pci->atu_base = devm_ioremap_resource(dev, res);
+			}
+			if (!pci->atu_base || IS_ERR(pci->atu_base))
 				pci->atu_base = pci->dbi_base + DEFAULT_DBI_ATU_OFFSET;
 		}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux