diff options
author | Hiago De Franco <hiago.franco@toradex.com> | 2025-03-21 11:32:16 -0300 |
---|---|---|
committer | Hiago De Franco <hiago.franco@toradex.com> | 2025-03-21 13:22:58 -0300 |
commit | 5a6602cc6c3204b24470b2429e658c25638b10a9 (patch) | |
tree | 9df7eef9c38d0d74cdbb2ee06231b0d795f261eb /lib/mpi/mpi-bit.c | |
parent | 6430f7550bbbe56f34bc0816a7163dcfb86b75d2 (diff) |
PCI: imx6: fix unbalanced disables for epdev_on regulator
Currently we are experiencing a kernel warning on pci-imx6.c driver,
with Apalis iMX8:
------------[ cut here ]------------
unbalanced disables for regulator-dummy
WARNING: CPU: 5 PID: 9 at drivers/regulator/core.c:2968 _regulator_disable+0x54/0x17c
Note regulator-dummy is actually the epdev_on regulator:
[ 2.877274] imx6q-pcie 5f010000.pcie: supply epdev_on not found, using dummy regulator
The issue happens when dw_pcie_host_init() starts imx6_pcie_start_link()
callback, which fails on dw_pcie_wait_for_link(pci). At this point the
code goes to 'err_reset_phy' and call regulator_disable() for epdev_on.
When the code returns from dw_pcie_host_init() with the error, the code
goes to 'err_ret_reg' which calls regulator_disable() again. This should
not happen, since the regulator was already disabled in the callback,
triggering the unbalanced disables.
Instead, jump to 'err_ret' to properly disable the phy.
This code does not exist upstream and the current driver does not
support any i.MX8* SoC.
Upstream-Status: Inappropriate [other]
Fixes: 5e1b09f67471 ("PCI: imx: Disable vpcie in case that the PCIe PLL does not lock")
Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions