mirror of https://gitee.com/openkylin/linux.git
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: f5d7837f96
("ravb: ptp: Add CONFIG mode support")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d0c5f45ae3
commit
50bfd83830
|
@ -1139,6 +1139,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
|
||||||
if (netif_running(ndev)) {
|
if (netif_running(ndev)) {
|
||||||
netif_device_detach(ndev);
|
netif_device_detach(ndev);
|
||||||
/* Stop PTP Clock driver */
|
/* Stop PTP Clock driver */
|
||||||
|
if (priv->chip_id == RCAR_GEN2)
|
||||||
ravb_ptp_stop(ndev);
|
ravb_ptp_stop(ndev);
|
||||||
/* Wait for DMA stopping */
|
/* Wait for DMA stopping */
|
||||||
error = ravb_stop_dma(ndev);
|
error = ravb_stop_dma(ndev);
|
||||||
|
@ -1170,6 +1171,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
|
||||||
ravb_emac_init(ndev);
|
ravb_emac_init(ndev);
|
||||||
|
|
||||||
/* Initialise PTP Clock driver */
|
/* Initialise PTP Clock driver */
|
||||||
|
if (priv->chip_id == RCAR_GEN2)
|
||||||
ravb_ptp_init(ndev, priv->pdev);
|
ravb_ptp_init(ndev, priv->pdev);
|
||||||
|
|
||||||
netif_device_attach(ndev);
|
netif_device_attach(ndev);
|
||||||
|
@ -1298,6 +1300,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
|
||||||
netif_tx_stop_all_queues(ndev);
|
netif_tx_stop_all_queues(ndev);
|
||||||
|
|
||||||
/* Stop PTP Clock driver */
|
/* Stop PTP Clock driver */
|
||||||
|
if (priv->chip_id == RCAR_GEN2)
|
||||||
ravb_ptp_stop(ndev);
|
ravb_ptp_stop(ndev);
|
||||||
|
|
||||||
/* Wait for DMA stopping */
|
/* Wait for DMA stopping */
|
||||||
|
@ -1311,6 +1314,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
|
||||||
ravb_emac_init(ndev);
|
ravb_emac_init(ndev);
|
||||||
|
|
||||||
/* Initialise PTP Clock driver */
|
/* Initialise PTP Clock driver */
|
||||||
|
if (priv->chip_id == RCAR_GEN2)
|
||||||
ravb_ptp_init(ndev, priv->pdev);
|
ravb_ptp_init(ndev, priv->pdev);
|
||||||
|
|
||||||
netif_tx_start_all_queues(ndev);
|
netif_tx_start_all_queues(ndev);
|
||||||
|
|
Loading…
Reference in New Issue