net: lan743x: permit VLAN-tagged packets up to configured MTU
Subsystems (3)
PATCH v2 1/1 net: lan743x: permit VLAN-tagged packets up to configured MTU
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.
---
v2:
- Added helper function, lan743x_mac_rx_enable_fse(), to set FSE bit properly
- Added explicit comment about use of distinct write cycle to set FSE bit
- Moved setting of FSE from lan743x_mac_open() to lan743x_mac_init(), allowing FSE bit to be set upon probe() path or suspend/resume path. This change fixes an issue raised by Sashiko
--- drivers/net/ethernet/microchip/lan743x_main.c | 32 +++++++++++++++++++ drivers/net/ethernet/microchip/lan743x_main.h | 1 + 2 files changed, 33 insertions(+)
drivers/net/ethernet/microchip/lan743x_main.c +32 -0
@@ -1219,6 +1219,36 @@ static void lan743x_mac_set_address(struct lan743x_adapter *adapter, "MAC address set to %pM\n", addr); } +static void lan743x_mac_rx_enable_fse (struct lan743x_adapter *adapter) +{ +u32 mac_rx; +bool rxen; + + mac_rx =lan743x_csr_read (adapter,MAC_RX ); +if (mac_rx &MAC_RX_FSE_ ) +return ; + + rxen = mac_rx &MAC_RX_RXEN_ ; +if (rxen) { + mac_rx &= ~MAC_RX_RXEN_ ; +lan743x_csr_write (adapter,MAC_RX , mac_rx); +lan743x_csr_wait_for_bit (adapter,MAC_RX ,MAC_RX_RXD_ , +1 ,1000 ,20000 ,100 ); + } + +/* Per AN2948, hardware prevents modification of the FSE bit while the +* MAC receiver is enabled (RXEN bit set). Use separate register write +* to assert the FSE bit before enabling the RXEN bit in MAC_RX +*/ + mac_rx |=MAC_RX_FSE_ ; +lan743x_csr_write (adapter,MAC_RX , mac_rx); + +if (rxen) { + mac_rx |=MAC_RX_RXEN_ ; +lan743x_csr_write (adapter,MAC_RX , mac_rx); + } +} +static int lan743x_mac_init (struct lan743x_adapter *adapter) {bool mac_address_valid = true;
@@ -1258,6 +1288,8 @@ static int lan743x_mac_init(struct lan743x_adapter *adapter)lan743x_mac_set_address (adapter, adapter->mac_address);eth_hw_addr_set (netdev, adapter->mac_address); +lan743x_mac_rx_enable_fse (adapter); +return 0 ; }
drivers/net/ethernet/microchip/lan743x_main.h +1 -0
@@ -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)
Signature · 1 line
2.43.0
Quoted 24 lines
-----Original Message-----
From: David Thompson <[email protected]>
Sent: Saturday, May 30, 2026 2:33 AM
To: Bryan Whitehead - C21958 <[email protected]>; UNGLinuxDriver <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; David Thompson <[email protected]>
Subject: [PATCH net v2] net: lan743x: permit VLAN-tagged packets up to configured MTUEXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
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_RXFSE (VLAN field size enforcement) bit determines whether frames with VLAN tags exceeding the base MTU plus tag length are discarded.
Quoted 7 lines
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 <[email protected]>
Quoted 79 lines
---
v2:
- Added helper function,lan743x_mac_rx_enable_fse(), to set FSE bit properly
- Added explicit comment about use of distinct write cycle to set FSE bit
- Moved setting of FSE fromlan743x_mac_open()tolan743x_mac_init(), allowing FSE
bit to be set uponprobe()path or suspend/resume path. This change fixes an issue raised by Sashiko--- drivers/net/ethernet/microchip/lan743x_main.c | 32 +++++++++++++++++++ drivers/net/ethernet/microchip/lan743x_main.h | 1 + 2 files changed, 33 insertions(+)drivers/net/ethernet/microchip/lan743x_main.c +32
-0@@ -1219,6 +1219,36 @@ static void lan743x_mac_set_address(struct lan743x_adapter *adapter, "MAC address set to %pM\n", addr); } +static void lan743x_mac_rx_enable_fse (struct lan743x_adapter *adapter) +{ +u32 mac_rx; +bool rxen; + + mac_rx =lan743x_csr_read (adapter,MAC_RX ); +if (mac_rx &MAC_RX_FSE_ ) +return ; + + rxen = mac_rx &MAC_RX_RXEN_ ; +if (rxen) { + mac_rx &= ~MAC_RX_RXEN_ ; +lan743x_csr_write (adapter,MAC_RX , mac_rx); +lan743x_csr_wait_for_bit (adapter,MAC_RX ,MAC_RX_RXD_ , +1 ,1000 ,20000 ,100 ); + } + +/* Per AN2948, hardware prevents modification of the FSE bit while the +* MAC receiver is enabled (RXEN bit set). Use separate register write +* to assert the FSE bit before enabling the RXEN bit in MAC_RX +*/ + mac_rx |=MAC_RX_FSE_ ; +lan743x_csr_write (adapter,MAC_RX , mac_rx); + +if (rxen) { + mac_rx |=MAC_RX_RXEN_ ; +lan743x_csr_write (adapter,MAC_RX , mac_rx); + } +} +static int lan743x_mac_init (struct lan743x_adapter *adapter) {bool mac_address_valid = true;@@ -1258,6 +1288,8 @@ static int lan743x_mac_init(struct lan743x_adapter *adapter)lan743x_mac_set_address (adapter, adapter->mac_address);eth_hw_addr_set (netdev, adapter->mac_address); +lan743x_mac_rx_enable_fse (adapter); +return 0 ; }drivers/net/ethernet/microchip/lan743x_main.h +1
-1@@ -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
Hi David
Quoted 89 lines · 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_RXFSE (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 <[email protected]>---
v2:
- Added helper function,lan743x_mac_rx_enable_fse(), to set FSE bit properly
- Added explicit comment about use of distinct write cycle to set FSE bit
- Moved setting of FSE fromlan743x_mac_open()tolan743x_mac_init(), allowing FSE
bit to be set uponprobe()path or suspend/resume path. This change
fixes an
issue raised by Sashiko--- drivers/net/ethernet/microchip/lan743x_main.c | 32 +++++++++++++++++++ drivers/net/ethernet/microchip/lan743x_main.h | 1 + 2 files changed, 33 insertions(+)drivers/net/ethernet/microchip/lan743x_main.c +18
-0@@ -1219,6 +1219,36 @@ static void lan743x_mac_set_address(struct lan743x_adapter *adapter, "MAC address set to %pM\n", addr); } +static void lan743x_mac_rx_enable_fse (struct lan743x_adapter *adapter) +{ +u32 mac_rx; +bool rxen; + + mac_rx =lan743x_csr_read (adapter,MAC_RX ); +if (mac_rx &MAC_RX_FSE_ ) +return ; + + rxen = mac_rx &MAC_RX_RXEN_ ; +if (rxen) { + mac_rx &= ~MAC_RX_RXEN_ ; +lan743x_csr_write (adapter,MAC_RX , mac_rx); +lan743x_csr_wait_for_bit (adapter,MAC_RX ,MAC_RX_RXD_ , +1 ,1000 ,20000 ,100 ); + } + +/* Per AN2948, hardware prevents modification of the FSE bit while the
drivers/net/ethernet/microchip/lan743x_main.c +1
-0+* MAC receiver is enabled (RXEN bit set). Use separate register write
drivers/net/ethernet/microchip/lan743x_main.c +13
-0+* to assert the FSE bit before enabling the RXEN bit in MAC_RX +*/ + mac_rx |=MAC_RX_FSE_ ; +lan743x_csr_write (adapter,MAC_RX , mac_rx); + +if (rxen) { + mac_rx |=MAC_RX_RXEN_ ; +lan743x_csr_write (adapter,MAC_RX , mac_rx); + } +} +static int lan743x_mac_init (struct lan743x_adapter *adapter) {bool mac_address_valid = true;@@ -1258,6 +1288,8 @@ static int lan743x_mac_init(struct lan743x_adapter *adapter) lan743x_mac_set_address(adapter, adapter->mac_address);eth_hw_addr_set (netdev, adapter->mac_address); +lan743x_mac_rx_enable_fse (adapter); +return 0 ; }drivers/net/ethernet/microchip/lan743x_main.h +0
-0
drivers/net/ethernet/microchip/lan743x_main.h line 187
Quoted 6 lines
drivers/net/ethernet/microchip/lan743x_main.h +1
-0@@ -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)
Thanks,
Nicolai
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Fri, 29 May 2026 21:03:00 +0000 you wrote:
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_RXFSE (VLAN field size enforcement) bit determines whether frames with VLAN tags exceeding the base MTU plus tag length are discarded.[...]
Here is the summary with links:
- [net,v2] net: lan743x: permit VLAN-tagged packets up to configured MTU
https://git.kernel.org/netdev/net/c/8173d22b211f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html