linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: macb: disable scatter-gather for macb on sama5d3
@ 2018-09-14 15:48 Nicolas Ferre
  2018-09-14 15:48 ` [PATCH] ARM: dts: at91: add new compatibility string " Nicolas Ferre
  2018-09-17 14:58 ` [PATCH] net: macb: disable scatter-gather " David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Ferre @ 2018-09-14 15:48 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, linux-arm-kernel, Claudiu Beznea,
	Alexandre Belloni, Ludovic Desroches, devicetree, Nicolas Ferre

Create a new configuration for the sama5d3-macb new compatibility string.
This configuration disables scatter-gather because we experienced lock down
of the macb interface of this particular SoC under very high load.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
 drivers/net/ethernet/cadence/macb_main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 16e4ef7d7185..f1a86b422617 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3837,6 +3837,13 @@ static const struct macb_config at91sam9260_config = {
 	.init = macb_init,
 };
 
+static const struct macb_config sama5d3macb_config = {
+	.caps = MACB_CAPS_SG_DISABLED
+	      | MACB_CAPS_USRIO_HAS_CLKEN | MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
+	.clk_init = macb_clk_init,
+	.init = macb_init,
+};
+
 static const struct macb_config pc302gem_config = {
 	.caps = MACB_CAPS_SG_DISABLED | MACB_CAPS_GIGABIT_MODE_AVAILABLE,
 	.dma_burst_length = 16,
@@ -3904,6 +3911,7 @@ static const struct of_device_id macb_dt_ids[] = {
 	{ .compatible = "cdns,gem", .data = &pc302gem_config },
 	{ .compatible = "atmel,sama5d2-gem", .data = &sama5d2_config },
 	{ .compatible = "atmel,sama5d3-gem", .data = &sama5d3_config },
+	{ .compatible = "atmel,sama5d3-macb", .data = &sama5d3macb_config },
 	{ .compatible = "atmel,sama5d4-gem", .data = &sama5d4_config },
 	{ .compatible = "cdns,at91rm9200-emac", .data = &emac_config },
 	{ .compatible = "cdns,emac", .data = &emac_config },
-- 
2.15.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] ARM: dts: at91: add new compatibility string for macb on sama5d3
  2018-09-14 15:48 [PATCH] net: macb: disable scatter-gather for macb on sama5d3 Nicolas Ferre
@ 2018-09-14 15:48 ` Nicolas Ferre
  2018-09-17 14:57   ` David Miller
  2018-09-17 14:58 ` [PATCH] net: macb: disable scatter-gather " David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Ferre @ 2018-09-14 15:48 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, linux-arm-kernel, Claudiu Beznea,
	Alexandre Belloni, Ludovic Desroches, devicetree, Nicolas Ferre

We need this new compatibility string as we experienced different behavior
for this 10/100Mbits/s macb interface on this particular SoC.
Backward compatibility is preserved as we keep the alternative strings.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
 Documentation/devicetree/bindings/net/macb.txt | 1 +
 arch/arm/boot/dts/sama5d3_emac.dtsi            | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt
index 457d5ae16f23..3e17ac1d5d58 100644
--- a/Documentation/devicetree/bindings/net/macb.txt
+++ b/Documentation/devicetree/bindings/net/macb.txt
@@ -10,6 +10,7 @@ Required properties:
   Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
   the Cadence GEM, or the generic form: "cdns,gem".
   Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs.
+  Use "atmel,sama5d3-macb" for the 10/100Mbit IP available on Atmel sama5d3 SoCs.
   Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs.
   Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
   Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
diff --git a/arch/arm/boot/dts/sama5d3_emac.dtsi b/arch/arm/boot/dts/sama5d3_emac.dtsi
index 7cb235ef0fb6..6e9e1c2f9def 100644
--- a/arch/arm/boot/dts/sama5d3_emac.dtsi
+++ b/arch/arm/boot/dts/sama5d3_emac.dtsi
@@ -41,7 +41,7 @@
 			};
 
 			macb1: ethernet@f802c000 {
-				compatible = "cdns,at91sam9260-macb", "cdns,macb";
+				compatible = "atmel,sama5d3-macb", "cdns,at91sam9260-macb", "cdns,macb";
 				reg = <0xf802c000 0x100>;
 				interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
 				pinctrl-names = "default";
-- 
2.15.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: at91: add new compatibility string for macb on sama5d3
  2018-09-14 15:48 ` [PATCH] ARM: dts: at91: add new compatibility string " Nicolas Ferre
@ 2018-09-17 14:57   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2018-09-17 14:57 UTC (permalink / raw)
  To: nicolas.ferre
  Cc: netdev, linux-kernel, linux-arm-kernel, claudiu.beznea,
	alexandre.belloni, ludovic.desroches, devicetree

From: Nicolas Ferre <nicolas.ferre@microchip.com>
Date: Fri, 14 Sep 2018 17:48:11 +0200

> We need this new compatibility string as we experienced different behavior
> for this 10/100Mbits/s macb interface on this particular SoC.
> Backward compatibility is preserved as we keep the alternative strings.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: macb: disable scatter-gather for macb on sama5d3
  2018-09-14 15:48 [PATCH] net: macb: disable scatter-gather for macb on sama5d3 Nicolas Ferre
  2018-09-14 15:48 ` [PATCH] ARM: dts: at91: add new compatibility string " Nicolas Ferre
@ 2018-09-17 14:58 ` David Miller
  2018-09-17 15:59   ` Nicolas Ferre
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2018-09-17 14:58 UTC (permalink / raw)
  To: nicolas.ferre
  Cc: netdev, linux-kernel, linux-arm-kernel, claudiu.beznea,
	alexandre.belloni, ludovic.desroches, devicetree

From: Nicolas Ferre <nicolas.ferre@microchip.com>
Date: Fri, 14 Sep 2018 17:48:10 +0200

> Create a new configuration for the sama5d3-macb new compatibility string.
> This configuration disables scatter-gather because we experienced lock down
> of the macb interface of this particular SoC under very high load.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Applied, but are you really sure it isn't just some bug in the driver
or somesuch?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: macb: disable scatter-gather for macb on sama5d3
  2018-09-17 14:58 ` [PATCH] net: macb: disable scatter-gather " David Miller
@ 2018-09-17 15:59   ` Nicolas Ferre
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Ferre @ 2018-09-17 15:59 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, linux-kernel, linux-arm-kernel, claudiu.beznea,
	alexandre.belloni, ludovic.desroches, devicetree

On 17/09/2018 at 16:58, David Miller wrote:
> From: Nicolas Ferre <nicolas.ferre@microchip.com>
> Date: Fri, 14 Sep 2018 17:48:10 +0200
> 
>> Create a new configuration for the sama5d3-macb new compatibility string.
>> This configuration disables scatter-gather because we experienced lock down
>> of the macb interface of this particular SoC under very high load.
>>
>> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> 
> Applied, but are you really sure it isn't just some bug in the driver
> or somesuch?

Actually, the same IP on other SoCs behaves correctly with same driver. 
We tried hard to find the root cause of the problem without success and 
we didn't have confirmation of an issue on Cadence's side either.

The symptom is that we have a receive overrun on this interface under 
heavy load but I think that it is more a result of the issue than the 
real problem: I cannot escape from this overrun condition: the IP itself 
is completely blocked.

Even if the problem is very difficult to reproduce (simple *perf tools 
not sufficient), we play safe by simply disabling this feature on this 
SoC only.

Best regards,
-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-17 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-14 15:48 [PATCH] net: macb: disable scatter-gather for macb on sama5d3 Nicolas Ferre
2018-09-14 15:48 ` [PATCH] ARM: dts: at91: add new compatibility string " Nicolas Ferre
2018-09-17 14:57   ` David Miller
2018-09-17 14:58 ` [PATCH] net: macb: disable scatter-gather " David Miller
2018-09-17 15:59   ` Nicolas Ferre

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).