From: Vivian Wang <wangruikang@iscas.ac.cn>
To: Andrew Lunn <andrew@lunn.ch>, Chukun Pan <amadeus@jmu.edu.cn>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, dlan@gentoo.org,
edumazet@google.com, kuba@kernel.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
netdev@vger.kernel.org, pabeni@redhat.com,
spacemit@lists.linux.dev
Subject: Re: [PATCH 1/1] net: spacemit: Check netif_carrier_ok when reading stats
Date: Tue, 20 Jan 2026 12:16:53 +0800 [thread overview]
Message-ID: <f63d455c-7593-4382-86ef-9c31a1ebd283@iscas.ac.cn> (raw)
In-Reply-To: <48757af2-bbea-4185-8cc9-2ef51dbc8373@lunn.ch>
On 1/19/26 23:09, Andrew Lunn wrote:
>> root@OpenWrt:~# ethtool -S eth1
>> [ 71.725539] k1_emac cac81000.ethernet eth1: Read stat timeout
>> NIC statistics:
>> rx_drp_fifo_full_pkts: 0
>> rx_truncate_fifo_full_pkts: 0
>>
>> I just discovered that adding "motorcomm,auto-sleep-disabled" to disable
>> the sleep mode of the MotorComm PHY prevents the problem from occurring.
> This suggests that when the PHY stops the reference clock, the MAC
> hardware stops working. It needs that clock to access
> statistics. Keeping the clock ticking will increase power usage a
> little.
As per suggestion from Chukun, adding realtek,aldps-enable to the DTS on
BananaPi F3 (with, obviously, a Realtek PHY) also reproduces this
problem. So this is a good indication that it really is a problem with
this power saving thing.
> I wounder if anything else stops working? There are some MACs whos DMA
> engine stop working without the reference clock. That can cause
> problems during both probe and remove, or open and close.
At least DMA reset seems to work in this case, so it's probably not as
big of a problem, but at least I would conclude that the HW design
didn't have the reference clock stopping in mind. AFAICT from the DTS
files a bunch of other boards also have motorcomm,auto-sleep-disabled so
at least SpacemiT isn't alone in this.
> So it would be nice to have a better understanding of this. If this
> turns out to be true, maybe a comment by this poll_read_timeout()
> indicating if it does timeout, the PHY might be the problem.
I'll send a patch updating the comments and error prints.
Thanks,
Vivian "dramforever" Wang
prev parent reply other threads:[~2026-01-20 4:17 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
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 [this message]
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=f63d455c-7593-4382-86ef-9c31a1ebd283@iscas.ac.cn \
--to=wangruikang@iscas.ac.cn \
--cc=amadeus@jmu.edu.cn \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@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 \
/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®