]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
PCI: dw-rockchip: Fix PHY function call sequence in rockchip_pcie_phy_deinit()
authorDiederik de Haas <didi.debian@cknow.org>
Thu, 17 Apr 2025 14:21:18 +0000 (16:21 +0200)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Sun, 27 Apr 2025 17:34:33 +0000 (23:04 +0530)
The documentation for the phy_power_off() function explicitly says that it
must be called before phy_exit().

Hence, follow the same rule in rockchip_pcie_phy_deinit().

Fixes: 0e898eb8df4e ("PCI: rockchip-dwc: Add Rockchip RK356X host controller driver")
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
[mani: commit message change]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Acked-by: Shawn Lin <shawn.lin@rock-chips.com>
Cc: stable@vger.kernel.org # v5.15+
Link: https://patch.msgid.link/20250417142138.1377451-1-didi.debian@cknow.org
drivers/pci/controller/dwc/pcie-dw-rockchip.c

index bfc47dab32e58add544335746e2f3dc7d817d8da..3c6ab71c996ec1246954f52a9454c8ae67956a54 100644 (file)
@@ -431,8 +431,8 @@ static int rockchip_pcie_phy_init(struct rockchip_pcie *rockchip)
 
 static void rockchip_pcie_phy_deinit(struct rockchip_pcie *rockchip)
 {
-       phy_exit(rockchip->phy);
        phy_power_off(rockchip->phy);
+       phy_exit(rockchip->phy);
 }
 
 static const struct dw_pcie_ops dw_pcie_ops = {