[PATCH net v3] net: spacemit: Check for netif_carrier_ok() in emac_stats_update(): manual merge

Matthieu Baerts matttbe at kernel.org
Tue Jan 27 03:02:38 PST 2026


Hi Vivian,

+cc Mark Brown

On 23/01/2026 04:52, Vivian Wang wrote:
> Some PHYs stop the refclk for power saving, usually while link down.
> This causes reading stats to time out.
> 
> Therefore, in emac_stats_update(), also don't update and reschedule if
> !netif_carrier_ok(). But that means we could be missing later updates if
> the link comes back up, so also reschedule when link up is detected in
> emac_adjust_link().
> 
> While we're at it, improve the comments and error message prints around
> this to reflect the better understanding of how this could happen.
> Hopefully if this happens again on new hardware, these comments will
> direct towards a solution.

(...)

> ---
> This has a conflict in context lines in emac_adjust_link() with current
> net-next, which will show up when pulling that for next rc1. Just remove
> "emac_set_fc_autoneg(priv);".

Thank you for this note, this was useful! Just in case it can be useful
for linux-next and Net maintainers, I confirm the conflict when merging
'net' in 'net-next' due to this patch applied in 'net':

  2c84959167d6 ("net: spacemit: Check for netif_carrier_ok() in
emac_stats_update()")

and this one from 'net-next':

  f66086798f91 ("net: spacemit: Remove broken flow control support")

The resolution is attached to this email, and rerere cache is available
there:

 https://github.com/multipath-tcp/mptcp-upstream-rr-cache/commit/526c74b

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7daa0aa370b7e9326e11e06fdb247227773bba0a.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20260127/b4cb45af/attachment.bin>


More information about the linux-riscv mailing list