[PATCH 1/1] net: spacemit: Check netif_carrier_ok when reading stats
Andrew Lunn
andrew at lunn.ch
Sun Jan 18 08:19:00 PST 2026
On Sun, Jan 18, 2026 at 06:00:00PM +0800, Chukun Pan wrote:
> Currently, when the interface is not linked up, reading the interface
> stats will print several timeout logs. Add a netif_carrier_ok check to
> the emac_stats_update function to avoid this situation:
>
> root at OpenWrt:~# ubus call network.device status
> [ 120.365060] k1_emac cac81000.ethernet eth1: Read stat timeout
What is the real issue here? That a clock is disabled? Can you test
the status of the clock, rather than adding yet more conditions to
this if ()?
Andrew
More information about the linux-riscv
mailing list