net: altera_tse: release phylink resources in tse_shutdown()
authorLiu Jian <liujian56@huawei.com>
Wed, 23 Nov 2022 01:16:17 +0000 (09:16 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 24 Nov 2022 08:34:43 +0000 (09:34 +0100)
Call phylink_disconnect_phy() in tse_shutdown() to release the
resources occupied by phylink_of_phy_connect() in the tse_open().

Fixes: fef2998203e1 ("net: altera: tse: convert to phylink")
Signed-off-by: Liu Jian <liujian56@huawei.com>
Link: https://lore.kernel.org/r/20221123011617.332302-1-liujian56@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/altera/altera_tse_main.c

index 7633b22..711d5b5 100644 (file)
@@ -990,6 +990,7 @@ static int tse_shutdown(struct net_device *dev)
        int ret;
 
        phylink_stop(priv->phylink);
+       phylink_disconnect_phy(priv->phylink);
        netif_stop_queue(dev);
        napi_disable(&priv->napi);