提交 50bfd838 编写于 作者: S Sergei Shtylyov 提交者: David S. Miller

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: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d0c5f45a
......@@ -1139,7 +1139,8 @@ static int ravb_set_ringparam(struct net_device *ndev,
if (netif_running(ndev)) {
netif_device_detach(ndev);
/* Stop PTP Clock driver */
ravb_ptp_stop(ndev);
if (priv->chip_id == RCAR_GEN2)
ravb_ptp_stop(ndev);
/* Wait for DMA stopping */
error = ravb_stop_dma(ndev);
if (error) {
......@@ -1170,7 +1171,8 @@ static int ravb_set_ringparam(struct net_device *ndev,
ravb_emac_init(ndev);
/* Initialise PTP Clock driver */
ravb_ptp_init(ndev, priv->pdev);
if (priv->chip_id == RCAR_GEN2)
ravb_ptp_init(ndev, priv->pdev);
netif_device_attach(ndev);
}
......@@ -1298,7 +1300,8 @@ static void ravb_tx_timeout_work(struct work_struct *work)
netif_tx_stop_all_queues(ndev);
/* Stop PTP Clock driver */
ravb_ptp_stop(ndev);
if (priv->chip_id == RCAR_GEN2)
ravb_ptp_stop(ndev);
/* Wait for DMA stopping */
ravb_stop_dma(ndev);
......@@ -1311,7 +1314,8 @@ static void ravb_tx_timeout_work(struct work_struct *work)
ravb_emac_init(ndev);
/* Initialise PTP Clock driver */
ravb_ptp_init(ndev, priv->pdev);
if (priv->chip_id == RCAR_GEN2)
ravb_ptp_init(ndev, priv->pdev);
netif_tx_start_all_queues(ndev);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册