OSDN Git Service

net: stmmac: fix double serdes powerdown
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 21 Jun 2023 13:55:37 +0000 (15:55 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Jun 2023 02:33:47 +0000 (19:33 -0700)
commitc4fc88ad2a765224a648db8ab35f125e120fe41b
tree3a48b17850336d83d07b1aae3e952619a9b29f2e
parentb9ec61be2d91cc09b5e7302e65442e6d71f0ed93
net: stmmac: fix double serdes powerdown

Commit 49725ffc15fc ("net: stmmac: power up/down serdes in
stmmac_open/release") correctly added a call to the serdes_powerdown()
callback to stmmac_release() but did not remove the one from
stmmac_remove() which leads to a doubled call to serdes_powerdown().

This can lead to all kinds of problems: in the case of the qcom ethqos
driver, it caused an unbalanced regulator disable splat.

Fixes: 49725ffc15fc ("net: stmmac: power up/down serdes in stmmac_open/release")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Junxiao Chang <junxiao.chang@intel.com>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20230621135537.376649-1-brgl@bgdev.pl
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c