Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50bfd838 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by David S. Miller
Browse files

ravb: skip gPTP start/stop on R-Car gen3



When adding support for the  R-Car gen3 gPTP active in configuration mode,
some call sites of ravb_ptp_{init|stop}() were missed due to an oversight.
Add  checks for the R-Car gen2 SoCs around these...

Fixes: f5d7837f ("ravb: ptp: Add CONFIG mode support")
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d0c5f45a
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1139,6 +1139,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
	if (netif_running(ndev)) {
		netif_device_detach(ndev);
		/* Stop PTP Clock driver */
		if (priv->chip_id == RCAR_GEN2)
			ravb_ptp_stop(ndev);
		/* Wait for DMA stopping */
		error = ravb_stop_dma(ndev);
@@ -1170,6 +1171,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
		ravb_emac_init(ndev);

		/* Initialise PTP Clock driver */
		if (priv->chip_id == RCAR_GEN2)
			ravb_ptp_init(ndev, priv->pdev);

		netif_device_attach(ndev);
@@ -1298,6 +1300,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
	netif_tx_stop_all_queues(ndev);

	/* Stop PTP Clock driver */
	if (priv->chip_id == RCAR_GEN2)
		ravb_ptp_stop(ndev);

	/* Wait for DMA stopping */
@@ -1311,6 +1314,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
	ravb_emac_init(ndev);

	/* Initialise PTP Clock driver */
	if (priv->chip_id == RCAR_GEN2)
		ravb_ptp_init(ndev, priv->pdev);

	netif_tx_start_all_queues(ndev);