This patch series includes two bug fixes for the LAN865x Ethernet MAC-PHY
driver:
1. Fix missing transmit queue restart on device reopen
This patch addresses an issue where the transmit queue is not restarted
when the network interface is brought back up after being taken down
(e.g., via ip or ifconfig). As a result, packet transmission hangs
after the first down/up cycle. The fix ensures netif_start_queue() is
explicitly called in lan865x_net_open() to properly restart the queue
on every reopen.
2. Fix missing configuration in the Microchip LAN865x driver for silicon
revisions B0 and B1, as documented in Microchip Application Note AN1760
(Rev F, June 2024). These revisions require the MAC to be configured for
timestamping at the end of the Start of Frame Delimiter (SFD) and the
Timer Increment register to be set to 40 ns, corresponding to a 25 MHz
internal clock.
Both patches address issues introduced with the initial driver support and
are marked with the appropriate Fixes: tag.
v2:
- Updated the register name details with proper names instead of using
generic "fixup" labels
- Revised the cover letter description of the second patch to reflect the
latest changes.
Parthiban Veerasooran (2):
microchip: lan865x: fix missing netif_start_queue() call on device
open
microchip: lan865x: fix missing Timer Increment config for Rev.B0/B1
.../net/ethernet/microchip/lan865x/lan865x.c | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
base-commit: bab3ce404553de56242d7b09ad7ea5b70441ea41
--
2.34.1
This fixes an issue where the transmit queue is started implicitly only
the very first time the device is registered. When the device is taken
down and brought back up again (using `ip` or `ifconfig`), the transmit
queue is not restarted, causing packet transmission to hang.
Adding an explicit call to netif_start_queue() in lan865x_net_open()
ensures the transmit queue is properly started every time the device
is reopened.
Fixes: 5cd2340cb6a3 ("microchip: lan865x: add driver support for Microchip's LAN865X MAC-PHY")
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
---
drivers/net/ethernet/microchip/lan865x/lan865x.c | 2 ++
1 file changed, 2 insertions(+)
Fix missing configuration for LAN865x silicon revisions B0 and B1 as per
Microchip Application Note AN1760 (Rev F, June 2024).
The Timer Increment register was not being set, which is required for
accurate timestamping. As per the application note, configure the MAC to
set timestamping at the end of the Start of Frame Delimiter (SFD), and
set the Timer Increment register to 40 ns (corresponding to a 25 MHz
internal clock).
Link: https://www.microchip.com/en-us/application-notes/an1760
Fixes: 5cd2340cb6a3 ("microchip: lan865x: add driver support for Microchip's LAN865X MAC-PHY")
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
---
.../net/ethernet/microchip/lan865x/lan865x.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
@@ -32,6 +32,10 @@/* MAC Specific Addr 1 Top Reg */#define LAN865X_REG_MAC_H_SADDR1 0x00010023+/* MAC TSU Timer Increment Register */+#define LAN865X_REG_MAC_TSU_TIMER_INCR 0x00010077+#define MAC_TSU_TIMER_INCR_COUNT_NANOSECONDS 0x0028+structlan865x_priv{structwork_structmulticast_work;structnet_device*netdev;
@@ -346,6 +350,21 @@ static int lan865x_probe(struct spi_device *spi)gotofree_netdev;}+/* LAN865x Rev.B0/B1 configuration parameters from AN1760+*AspertheConfigurationApplicationNoteAN1760publishedinthe+*link,https://www.microchip.com/en-us/application-notes/an1760+*RevisionF(DS60001760G-June2024),configuretheMACtosettime+*stampingattheendoftheStartofFrameDelimiter(SFD)andsetthe+*TimerIncrementregto40nstobeusedasa25MHzinternalclock.+*/+ret=oa_tc6_write_register(priv->tc6,LAN865X_REG_MAC_TSU_TIMER_INCR,+MAC_TSU_TIMER_INCR_COUNT_NANOSECONDS);+if(ret){+dev_err(&spi->dev,"Failed to config TSU Timer Incr reg: %d\n",+ret);+gotooa_tc6_exit;+}+/* As per the point s3 in the below errata, SPI receive Ethernet frame*transfermayhaltwhenstartingthenextframeinthesamedatablock*(chunk)astheendofapreviousframe.TheRFAfieldshouldbe
Fix missing configuration for LAN865x silicon revisions B0 and B1 as per
Microchip Application Note AN1760 (Rev F, June 2024).
The Timer Increment register was not being set, which is required for
accurate timestamping. As per the application note, configure the MAC to
set timestamping at the end of the Start of Frame Delimiter (SFD), and
set the Timer Increment register to 40 ns (corresponding to a 25 MHz
internal clock).
Link: https://www.microchip.com/en-us/application-notes/an1760
Fixes: 5cd2340cb6a3 ("microchip: lan865x: add driver support for Microchip's LAN865X MAC-PHY")
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
---
.../net/ethernet/microchip/lan865x/lan865x.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
@@ -32,6 +32,10 @@/* MAC Specific Addr 1 Top Reg */#define LAN865X_REG_MAC_H_SADDR1 0x00010023+/* MAC TSU Timer Increment Register */+#define LAN865X_REG_MAC_TSU_TIMER_INCR 0x00010077+#define MAC_TSU_TIMER_INCR_COUNT_NANOSECONDS 0x0028+structlan865x_priv{structwork_structmulticast_work;structnet_device*netdev;
@@ -346,6 +350,21 @@ static int lan865x_probe(struct spi_device *spi)gotofree_netdev;}+/* LAN865x Rev.B0/B1 configuration parameters from AN1760+*AspertheConfigurationApplicationNoteAN1760publishedinthe+*link,https://www.microchip.com/en-us/application-notes/an1760+*RevisionF(DS60001760G-June2024),configuretheMACtosettime+*stampingattheendoftheStartofFrameDelimiter(SFD)andsetthe+*TimerIncrementregto40nstobeusedasa25MHzinternalclock.+*/+ret=oa_tc6_write_register(priv->tc6,LAN865X_REG_MAC_TSU_TIMER_INCR,+MAC_TSU_TIMER_INCR_COUNT_NANOSECONDS);+if(ret){+dev_err(&spi->dev,"Failed to config TSU Timer Incr reg: %d\n",+ret);+gotooa_tc6_exit;+}+/* As per the point s3 in the below errata, SPI receive Ethernet frame*transfermayhaltwhenstartingthenextframeinthesamedatablock*(chunk)astheendofapreviousframe.TheRFAfieldshouldbe
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski [off-list ref]:
On Mon, 18 Aug 2025 11:35:12 +0530 you wrote:
This patch series includes two bug fixes for the LAN865x Ethernet MAC-PHY
driver:
1. Fix missing transmit queue restart on device reopen
This patch addresses an issue where the transmit queue is not restarted
when the network interface is brought back up after being taken down
(e.g., via ip or ifconfig). As a result, packet transmission hangs
after the first down/up cycle. The fix ensures netif_start_queue() is
explicitly called in lan865x_net_open() to properly restart the queue
on every reopen.
[...]