From: Paul Barker <paul.barker.ct@bp.renesas.com>
To: "Sergey Shtylyov" <s.shtylyov@omp.ru>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: Paul Barker <paul.barker.ct@bp.renesas.com>,
Biju Das <biju.das.jz@bp.renesas.com>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Mitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com>,
netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [net-next PATCH 2/2] net: ravb: Fix R-Car RX frame size limit
Date: Sat, 15 Jun 2024 11:30:38 +0100 [thread overview]
Message-ID: <20240615103038.973-3-paul.barker.ct@bp.renesas.com> (raw)
In-Reply-To: <20240615103038.973-1-paul.barker.ct@bp.renesas.com>
The RX frame size limit should not be based on the current MTU setting.
Instead it should be based on the hardware capabilities.
Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
---
drivers/net/ethernet/renesas/ravb_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 02cbf850bd85..481c854cb305 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -555,8 +555,10 @@ static void ravb_emac_init_gbeth(struct net_device *ndev)
static void ravb_emac_init_rcar(struct net_device *ndev)
{
+ struct ravb_private *priv = netdev_priv(ndev);
+
/* Receive frame limit set register */
- ravb_write(ndev, ndev->mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN, RFLR);
+ ravb_write(ndev, priv->info->rx_max_frame_size + ETH_FCS_LEN, RFLR);
/* EMAC Mode: PAUSE prohibition; Duplex; RX Checksum; TX; RX */
ravb_write(ndev, ECMR_ZPF | ECMR_DM |
--
2.39.2
next prev parent reply other threads:[~2024-06-15 10:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-15 10:30 [net-next PATCH 0/2] Fix maximum TX/RX frame sizes in ravb driver Paul Barker
2024-06-15 10:30 ` [net-next PATCH 1/2] net: ravb: Fix maximum MTU for GbEth devices Paul Barker
2024-06-15 12:38 ` Niklas Söderlund
2024-06-17 19:38 ` Sergey Shtylyov
2024-06-17 19:45 ` Sergey Shtylyov
2024-08-13 13:37 ` Paul Barker
2024-06-18 0:07 ` Jakub Kicinski
2024-08-13 12:53 ` Paul Barker
2024-06-15 10:30 ` Paul Barker [this message]
2024-06-15 13:04 ` [net-next PATCH 2/2] net: ravb: Fix R-Car RX frame size limit Niklas Söderlund
2024-06-17 14:20 ` Paul Barker
2024-06-16 1:23 ` Andrew Lunn
2024-06-17 14:03 ` Paul Barker
2024-06-17 14:29 ` Andrew Lunn
2024-08-13 13:29 ` Paul Barker
2024-08-13 14:06 ` Andrew Lunn
2024-08-15 9:10 ` Paul Barker
2024-06-17 20:18 ` Sergey Shtylyov
2024-06-16 19:22 ` [net-next PATCH 0/2] Fix maximum TX/RX frame sizes in ravb driver Sergey Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240615103038.973-3-paul.barker.ct@bp.renesas.com \
--to=paul.barker.ct@bp.renesas.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mitsuhiro.kimura.kc@renesas.com \
--cc=netdev@vger.kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=pabeni@redhat.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=s.shtylyov@omp.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).