netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3
@ 2017-07-05 15:36 Nicolas Ferre
  2017-07-08  9:40 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Ferre @ 2017-07-05 15:36 UTC (permalink / raw)
  To: netdev, David S. Miller, rafalo
  Cc: Alexandre Belloni, linux-arm-kernel, linux-kernel, vishnuvardhan,
	Nicolas Ferre

From: vishnuvardhan <vardhanraj4143@gmail.com>

As per the SAMA5D3 device specification it supports Jumbo frames.
But the suggested flag and length of bytes it supports was not updated
in this driver config_structure.
The maximum jumbo frames the device supports :
10240 bytes as per the device spec.

While changing the MTU value greater than 1500, it threw error:
sudo ifconfig eth1 mtu 9000
SIOCSIFMTU: Invalid argument

Add this support to driver so that it works as expected and designed.

Signed-off-by: vishnuvardhan <vardhanraj4143@gmail.com>
[nicolas.ferre@microchip.com: modify slightly commit msg]
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
 drivers/net/ethernet/cadence/macb_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index e69ebdd65658..26d25749c3e4 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3314,10 +3314,11 @@ static const struct macb_config sama5d2_config = {
 
 static const struct macb_config sama5d3_config = {
 	.caps = MACB_CAPS_SG_DISABLED | MACB_CAPS_GIGABIT_MODE_AVAILABLE
-	      | MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
+	      | MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_JUMBO,
 	.dma_burst_length = 16,
 	.clk_init = macb_clk_init,
 	.init = macb_init,
+	.jumbo_max_len = 10240,
 };
 
 static const struct macb_config sama5d4_config = {
-- 
2.9.0

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

* Re: [PATCH] net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3
  2017-07-05 15:36 [PATCH] net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3 Nicolas Ferre
@ 2017-07-08  9:40 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-07-08  9:40 UTC (permalink / raw)
  To: nicolas.ferre
  Cc: rafalo, netdev, linux-kernel, alexandre.belloni, vardhanraj4143,
	linux-arm-kernel

From: Nicolas Ferre <nicolas.ferre@microchip.com>
Date: Wed, 5 Jul 2017 17:36:16 +0200

> From: vishnuvardhan <vardhanraj4143@gmail.com>
> 
> As per the SAMA5D3 device specification it supports Jumbo frames.
> But the suggested flag and length of bytes it supports was not updated
> in this driver config_structure.
> The maximum jumbo frames the device supports :
> 10240 bytes as per the device spec.
> 
> While changing the MTU value greater than 1500, it threw error:
> sudo ifconfig eth1 mtu 9000
> SIOCSIFMTU: Invalid argument
> 
> Add this support to driver so that it works as expected and designed.
> 
> Signed-off-by: vishnuvardhan <vardhanraj4143@gmail.com>
> [nicolas.ferre@microchip.com: modify slightly commit msg]
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Applied, thank you.

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

end of thread, other threads:[~2017-07-08  9:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-05 15:36 [PATCH] net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3 Nicolas Ferre
2017-07-08  9:40 ` 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).