]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: ravb: Start TX queues after HW initialization succeeded
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tue, 28 Nov 2023 08:04:37 +0000 (10:04 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 30 Nov 2023 09:59:07 +0000 (10:59 +0100)
ravb_phy_start() may fail. If that happens, the TX queues will remain
started. Thus, move the netif_tx_start_all_queues() after PHY is
successfully initialized.

Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/renesas/ravb_main.c

index 4d57ecfdfe61cd862d1d903f4d1b7db8ec4719c4..5f1fb94c5ab713056c4cfce6d6ca6b42341ed8a4 100644 (file)
@@ -1812,13 +1812,13 @@ static int ravb_open(struct net_device *ndev)
        if (info->gptp)
                ravb_ptp_init(ndev, priv->pdev);
 
-       netif_tx_start_all_queues(ndev);
-
        /* PHY control start */
        error = ravb_phy_start(ndev);
        if (error)
                goto out_ptp_stop;
 
+       netif_tx_start_all_queues(ndev);
+
        return 0;
 
 out_ptp_stop: