From: Andrew Lunn <andrew@lunn.ch>
To: Chukun Pan <amadeus@jmu.edu.cn>
Cc: Vivian Wang <wangruikang@iscas.ac.cn>,
Yixun Lan <dlan@gentoo.org>, Paolo Abeni <pabeni@redhat.com>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
spacemit@lists.linux.dev, netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] net: spacemit: Check netif_carrier_ok when reading stats
Date: Sun, 18 Jan 2026 17:19:00 +0100 [thread overview]
Message-ID: <3659a81b-4393-4a8d-bc8d-6ab89396353d@lunn.ch> (raw)
In-Reply-To: <20260118100000.224793-1-amadeus@jmu.edu.cn>
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@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
next prev parent reply other threads:[~2026-01-18 16:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-18 10:00 Chukun Pan
2026-01-18 16:19 ` Andrew Lunn [this message]
2026-01-19 3:54 ` Vivian Wang
2026-01-19 14:16 ` Chukun Pan
2026-01-19 15:09 ` Andrew Lunn
2026-01-20 4:16 ` Vivian Wang
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=3659a81b-4393-4a8d-bc8d-6ab89396353d@lunn.ch \
--to=andrew@lunn.ch \
--cc=amadeus@jmu.edu.cn \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dlan@gentoo.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=spacemit@lists.linux.dev \
--cc=wangruikang@iscas.ac.cn \
/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
all inboxes | Powered by JetHome®