net: ravb: Keep the reverse order of operations in ravb_close()
Keep the reverse order of operations in ravb_close() when compared with ravb_open(). This is the recommended configuration sequence. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a260f08066
commit
a5f149a97d
@ -2317,6 +2317,14 @@ static int ravb_close(struct net_device *ndev)
|
||||
ravb_write(ndev, 0, RIC2);
|
||||
ravb_write(ndev, 0, TIC);
|
||||
|
||||
/* PHY disconnect */
|
||||
if (ndev->phydev) {
|
||||
phy_stop(ndev->phydev);
|
||||
phy_disconnect(ndev->phydev);
|
||||
if (of_phy_is_fixed_link(np))
|
||||
of_phy_deregister_fixed_link(np);
|
||||
}
|
||||
|
||||
/* Stop PTP Clock driver */
|
||||
if (info->gptp || info->ccc_gac)
|
||||
ravb_ptp_stop(ndev);
|
||||
@ -2335,14 +2343,6 @@ static int ravb_close(struct net_device *ndev)
|
||||
}
|
||||
}
|
||||
|
||||
/* PHY disconnect */
|
||||
if (ndev->phydev) {
|
||||
phy_stop(ndev->phydev);
|
||||
phy_disconnect(ndev->phydev);
|
||||
if (of_phy_is_fixed_link(np))
|
||||
of_phy_deregister_fixed_link(np);
|
||||
}
|
||||
|
||||
cancel_work_sync(&priv->work);
|
||||
|
||||
if (info->nc_queues)
|
||||
|
Loading…
x
Reference in New Issue
Block a user