On Sun, Jan 3, 2021 at 7:17 PM Samuel Holland <sam...@sholland.org> wrote: > > While stmmac_pltfr_remove calls sun8i_dwmac_exit, the sun8i_dwmac_init > and sun8i_dwmac_exit functions are also called by the stmmac_platform > suspend/resume callbacks. They may be called many times during the > device's lifetime and should not release resources used by the driver. > > Furthermore, there was no error handling in case registering the MDIO > mux failed during probe, and the EPHY clock was never released at all. > > Fix all of these issues by moving the deinitialization code to a driver > removal callback. Also ensure the EPHY is powered down before removal. > > Fixes: 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external > MDIOs") > Signed-off-by: Samuel Holland <sam...@sholland.org>
Reviewed-by: Chen-Yu Tsai <w...@csie.org> -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/CAGb2v66j%2Bxj-Pq5ijcb%2BHwLUf0TZkDDnpHcTjj20Q%2BM2UEtqUQ%40mail.gmail.com.