Patch "PCI: starfive: Enable controller runtime PM before probing host bridge" has been added to the 6.12-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: starfive: Enable controller runtime PM before probing host bridge

to the 6.12-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-starfive-enable-controller-runtime-pm-before-pro.patch
and it can be found in the queue-6.12 subdirectory.

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



commit 7c05400d7dc695c4cdadaf905721508180506c89
Author: Mayank Rana <quic_mrana@xxxxxxxxxxx>
Date:   Mon Nov 11 14:11:52 2024 +0530

    PCI: starfive: Enable controller runtime PM before probing host bridge
    
    [ Upstream commit 6168efbebace0db443185d4c6701ca8170a8788d ]
    
    A PCI controller device, e.g., StarFive, is parent to PCI host bridge
    device. We must enable runtime PM of the controller before enabling runtime
    PM of the host bridge, which will happen in pci_host_probe(), to avoid this
    warning:
    
      pcie-starfive 940000000.pcie: Enabling runtime PM for inactive device with active children
    
    Fix this issue by enabling StarFive controller device's runtime PM before
    calling pci_host_probe() in plda_pcie_host_init().
    
    Link: https://lore.kernel.org/r/20241111-runtime_pm-v7-1-9c164eefcd87@xxxxxxxxxxx
    Tested-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
    Signed-off-by: Mayank Rana <quic_mrana@xxxxxxxxxxx>
    [bhelgaas: commit log]
    Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/controller/plda/pcie-starfive.c b/drivers/pci/controller/plda/pcie-starfive.c
index c9933ecf68338..0564fdce47c2a 100644
--- a/drivers/pci/controller/plda/pcie-starfive.c
+++ b/drivers/pci/controller/plda/pcie-starfive.c
@@ -404,6 +404,9 @@ static int starfive_pcie_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
+	pm_runtime_enable(&pdev->dev);
+	pm_runtime_get_sync(&pdev->dev);
+
 	plda->host_ops = &sf_host_ops;
 	plda->num_events = PLDA_MAX_EVENT_NUM;
 	/* mask doorbell event */
@@ -413,11 +416,12 @@ static int starfive_pcie_probe(struct platform_device *pdev)
 	plda->events_bitmap <<= PLDA_NUM_DMA_EVENTS;
 	ret = plda_pcie_host_init(&pcie->plda, &starfive_pcie_ops,
 				  &stf_pcie_event);
-	if (ret)
+	if (ret) {
+		pm_runtime_put_sync(&pdev->dev);
+		pm_runtime_disable(&pdev->dev);
 		return ret;
+	}
 
-	pm_runtime_enable(&pdev->dev);
-	pm_runtime_get_sync(&pdev->dev);
 	platform_set_drvdata(pdev, pcie);
 
 	return 0;




[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