* [PATCH 0/2] ravb: fix the fallout of R-Car gen3 gPTP support
@ 2016-02-06 14:45 Sergei Shtylyov
2016-02-06 14:46 ` [PATCH 1/2] ravb: kill duplicate setting of CCC.CSEL Sergei Shtylyov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2016-02-06 14:45 UTC (permalink / raw)
To: netdev; +Cc: linux-renesas-soc
Hello.
Here's a set of 2 patches against DaveM's 'net.git' repo fixing up the
incomplete commit f5d7837f96e5 ("ravb: ptp: Add CONFIG mode support").
I'm proposing these as fixes but they can be merged as cleanups as well...
[1/2] ravb: kill duplicate setting of CCC.CSEL
[2/2] ravb: skip gPTP start/stop on R-Car gen3
MBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] ravb: kill duplicate setting of CCC.CSEL
2016-02-06 14:45 [PATCH 0/2] ravb: fix the fallout of R-Car gen3 gPTP support Sergei Shtylyov
@ 2016-02-06 14:46 ` Sergei Shtylyov
2016-02-06 14:47 ` [PATCH 2/2] ravb: skip gPTP start/stop on R-Car gen3 Sergei Shtylyov
2016-02-16 19:53 ` [PATCH 0/2] ravb: fix the fallout of R-Car gen3 gPTP support David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2016-02-06 14:46 UTC (permalink / raw)
To: netdev; +Cc: linux-renesas-soc
When adding support for the R-Car gen3 gPTP active in configuration mode,
the code setting the CCC.CSEL field was duplicated due to an oversight.
For R-Car gen 2 it's just redundant and for R-Car gen3 the write at this
time is probably ignored due to CCC.GAC bit being already set...
Fixes: f5d7837f96e5 ("ravb: ptp: Add CONFIG mode support")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
drivers/net/ethernet/renesas/ravb_main.c | 4 ----
1 file changed, 4 deletions(-)
Index: net/drivers/net/ethernet/renesas/ravb_main.c
===================================================================
--- net.orig/drivers/net/ethernet/renesas/ravb_main.c
+++ net/drivers/net/ethernet/renesas/ravb_main.c
@@ -1814,10 +1814,6 @@ static int ravb_probe(struct platform_de
CCC_OPC_CONFIG | CCC_GAC | CCC_CSEL_HPB, CCC);
}
- /* Set CSEL value */
- ravb_write(ndev, (ravb_read(ndev, CCC) & ~CCC_CSEL) | CCC_CSEL_HPB,
- CCC);
-
/* Set GTI value */
error = ravb_set_gti(ndev);
if (error)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] ravb: skip gPTP start/stop on R-Car gen3
2016-02-06 14:45 [PATCH 0/2] ravb: fix the fallout of R-Car gen3 gPTP support Sergei Shtylyov
2016-02-06 14:46 ` [PATCH 1/2] ravb: kill duplicate setting of CCC.CSEL Sergei Shtylyov
@ 2016-02-06 14:47 ` Sergei Shtylyov
2016-02-16 19:53 ` [PATCH 0/2] ravb: fix the fallout of R-Car gen3 gPTP support David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2016-02-06 14:47 UTC (permalink / raw)
To: netdev; +Cc: linux-renesas-soc
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: f5d7837f96e5 ("ravb: ptp: Add CONFIG mode support")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
drivers/net/ethernet/renesas/ravb_main.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
Index: net/drivers/net/ethernet/renesas/ravb_main.c
===================================================================
--- net.orig/drivers/net/ethernet/renesas/ravb_main.c
+++ net/drivers/net/ethernet/renesas/ravb_main.c
@@ -1139,7 +1139,8 @@ static int ravb_set_ringparam(struct net
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
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
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
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);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] ravb: fix the fallout of R-Car gen3 gPTP support
2016-02-06 14:45 [PATCH 0/2] ravb: fix the fallout of R-Car gen3 gPTP support Sergei Shtylyov
2016-02-06 14:46 ` [PATCH 1/2] ravb: kill duplicate setting of CCC.CSEL Sergei Shtylyov
2016-02-06 14:47 ` [PATCH 2/2] ravb: skip gPTP start/stop on R-Car gen3 Sergei Shtylyov
@ 2016-02-16 19:53 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-02-16 19:53 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, linux-renesas-soc
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Sat, 06 Feb 2016 17:45:37 +0300
> Here's a set of 2 patches against DaveM's 'net.git' repo fixing up the
> incomplete commit f5d7837f96e5 ("ravb: ptp: Add CONFIG mode support").
> I'm proposing these as fixes but they can be merged as cleanups as well...
>
> [1/2] ravb: kill duplicate setting of CCC.CSEL
> [2/2] ravb: skip gPTP start/stop on R-Car gen3
Series applied, thanks Sergei.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-16 19:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-06 14:45 [PATCH 0/2] ravb: fix the fallout of R-Car gen3 gPTP support Sergei Shtylyov
2016-02-06 14:46 ` [PATCH 1/2] ravb: kill duplicate setting of CCC.CSEL Sergei Shtylyov
2016-02-06 14:47 ` [PATCH 2/2] ravb: skip gPTP start/stop on R-Car gen3 Sergei Shtylyov
2016-02-16 19:53 ` [PATCH 0/2] ravb: fix the fallout of R-Car gen3 gPTP support David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).