* [PATCH net] net: lan743x: permit VLAN-tagged packets up to configured MTU
@ 2026-05-15 19:23 David Thompson
2026-05-20 1:30 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: David Thompson @ 2026-05-15 19:23 UTC (permalink / raw)
To: bryan.whitehead, UNGLinuxDriver, andrew+netdev, davem, edumazet,
kuba, pabeni
Cc: netdev, linux-kernel, David Thompson
VLAN-tagged interfaces on lan743x devices were previously unreachable via
SSH and failed to respond to large ping packets (e.g. "ping -s 1469" given
MTU=1500). In these scenarios, "ethtool -S" reports non-zero "RX Oversize
Frame Errors". According to Microchip AN2948, the MAC_RX FSE (VLAN field
size enforcement) bit determines whether frames with VLAN tags exceeding
the base MTU plus tag length are discarded.
The driver must set the MAC_RX.FSE bit before setting MAC_RX.RXEN to allow
VLAN-tagged frames up to the interface MTU, preventing them from being
treated as oversized. As a result, both the base and VLAN-tagged interfaces
can use the same MTU without receive errors.
Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: David Thompson <davthompson@nvidia.com>
---
drivers/net/ethernet/microchip/lan743x_main.c | 2 ++
drivers/net/ethernet/microchip/lan743x_main.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index f3332417162e..6c840f8dd9c3 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -1266,6 +1266,8 @@ static int lan743x_mac_open(struct lan743x_adapter *adapter)
u32 temp;
temp = lan743x_csr_read(adapter, MAC_RX);
+ temp |= MAC_RX_FSE_;
+ lan743x_csr_write(adapter, MAC_RX, temp);
lan743x_csr_write(adapter, MAC_RX, temp | MAC_RX_RXEN_);
temp = lan743x_csr_read(adapter, MAC_TX);
lan743x_csr_write(adapter, MAC_TX, temp | MAC_TX_TXEN_);
diff --git a/drivers/net/ethernet/microchip/lan743x_main.h b/drivers/net/ethernet/microchip/lan743x_main.h
index 160d94a7cee6..1573c8f9c993 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.h
+++ b/drivers/net/ethernet/microchip/lan743x_main.h
@@ -182,6 +182,7 @@
#define MAC_RX (0x104)
#define MAC_RX_MAX_SIZE_SHIFT_ (16)
#define MAC_RX_MAX_SIZE_MASK_ (0x3FFF0000)
+#define MAC_RX_FSE_ BIT(2)
#define MAC_RX_RXD_ BIT(1)
#define MAC_RX_RXEN_ BIT(0)
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: lan743x: permit VLAN-tagged packets up to configured MTU
2026-05-15 19:23 [PATCH net] net: lan743x: permit VLAN-tagged packets up to configured MTU David Thompson
@ 2026-05-20 1:30 ` Jakub Kicinski
2026-05-20 19:44 ` David Thompson
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2026-05-20 1:30 UTC (permalink / raw)
To: David Thompson
Cc: bryan.whitehead, UNGLinuxDriver, andrew+netdev, davem, edumazet,
pabeni, netdev, linux-kernel
On Fri, 15 May 2026 19:23:57 +0000 David Thompson wrote:
> The driver must set the MAC_RX.FSE bit before setting MAC_RX.RXEN to allow
> VLAN-tagged frames up to the interface MTU
AFAIU this sentence indicates that the double write
is intentional but could you make that more explicit?
Maybe mention whether this is based on experience or the AN?
It's going to be invaluable if someone ever sends a "cleanup"
to fold the writes into one..
> temp = lan743x_csr_read(adapter, MAC_RX);
> + temp |= MAC_RX_FSE_;
> + lan743x_csr_write(adapter, MAC_RX, temp);
> lan743x_csr_write(adapter, MAC_RX, temp | MAC_RX_RXEN_);
--
pw-bot: cr
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH net] net: lan743x: permit VLAN-tagged packets up to configured MTU
2026-05-20 1:30 ` Jakub Kicinski
@ 2026-05-20 19:44 ` David Thompson
0 siblings, 0 replies; 3+ messages in thread
From: David Thompson @ 2026-05-20 19:44 UTC (permalink / raw)
To: Jakub Kicinski
Cc: bryan.whitehead@microchip.com, UNGLinuxDriver@microchip.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Tuesday, May 19, 2026 9:31 PM
> To: David Thompson <davthompson@nvidia.com>
> Cc: bryan.whitehead@microchip.com; UNGLinuxDriver@microchip.com;
> andrew+netdev@lunn.ch; davem@davemloft.net; edumazet@google.com;
> pabeni@redhat.com; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH net] net: lan743x: permit VLAN-tagged packets up to
> configured MTU
>
> On Fri, 15 May 2026 19:23:57 +0000 David Thompson wrote:
> > The driver must set the MAC_RX.FSE bit before setting MAC_RX.RXEN to
> > allow VLAN-tagged frames up to the interface MTU
>
> AFAIU this sentence indicates that the double write is intentional but could you
> make that more explicit?
> Maybe mention whether this is based on experience or the AN?
>
> It's going to be invaluable if someone ever sends a "cleanup"
> to fold the writes into one..
>
> > temp = lan743x_csr_read(adapter, MAC_RX);
> > + temp |= MAC_RX_FSE_;
> > + lan743x_csr_write(adapter, MAC_RX, temp);
> > lan743x_csr_write(adapter, MAC_RX, temp | MAC_RX_RXEN_);
> --
> pw-bot: cr
Thank you for the review, Jakub.
Yes, this second write is intentional per Application Note 2948.
I will add a comment to clarify this and post a v2.
- Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-20 19:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 19:23 [PATCH net] net: lan743x: permit VLAN-tagged packets up to configured MTU David Thompson
2026-05-20 1:30 ` Jakub Kicinski
2026-05-20 19:44 ` David Thompson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.