diff mbox series

net: macb: disable scatter-gather for macb on sama5d3

Message ID 20180914154811.12090-1-nicolas.ferre@microchip.com (mailing list archive)
State New, archived
Headers show
Series net: macb: disable scatter-gather for macb on sama5d3 | expand

Commit Message

Nicolas Ferre Sept. 14, 2018, 3:48 p.m. UTC
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(+)

Comments

David Miller Sept. 17, 2018, 2:58 p.m. UTC | #1
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?
Nicolas Ferre Sept. 17, 2018, 3:59 p.m. UTC | #2
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,
diff mbox series

Patch

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 },