From: Arthur Crepin Leblond <arthur@marmottus.net>
To: Paolo Abeni <pabeni@redhat.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, arnd@arndb.de, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
krzysztof.kozlowski@oss.qualcomm.com
Subject: Re: [PATCH net-next v7 3/3] w5100: detect carrier state using link status bit and optional interrupt
Date: Thu, 10 Sep 2026 14:28:08 +0200 [thread overview]
Message-ID: <20260910122808.GA323870@marmottus.net> (raw)
In-Reply-To: <013fffd2-6d59-4e99-8214-1377b1cb46bb@redhat.com>
On Thu, Sep 10, 2026 at 01:27:42PM +0200, Paolo Abeni wrote:
>On 9/9/26 2:39 PM, netdev-bot+sashiko@kernel.org wrote:
Hi Paolo,
>> Thank you for your contribution! Sashiko AI review found 4 potential
>> issue(s) to consider:
>>
>> Critical: 0 · High: 1 · Medium: 2 · Low: 1
>>
>> - [High] On w5500 the carrier state is now sampled exactly once per ifup
>> (and once per resume) from PHYCFGR, with no polling fallback and no…
>
>I read this one as 'with a bad config/devtree the eth could non functional'
>which does look a big deal to me...
Yeah I would also say so, wtihout an additional interrupt configured
you cannot really get notified of the carrier state changes. Only
.get_link is useful (and only for w5500).
But where Sashiko might be right is that the previous implementation
was not calling netif_carrier_on/off on w5100_open and did not have
.get_link set. So maybe .get_link should only be set on w5500 and
netif_carrier_on/off called only if the link irq is set.
>
>> - [Medium] `w5500_get_phycfgr_lnk()` returns a tri-state value (<0 on
>> SPI/register read error, 0 link down, 1 link up), and its consumers…
>> - [Medium] The carrier state is computed and published by two
>> unsynchronized contexts.
>
>... but the above 2 looks relevant to me. Note that ordering the irq
>enabling and initial link detection is not enough, you need explicit
>synchronization.
I'll try to use rtnl_lock.
>
>Finally please note commit c82ff94592fb68f529afe63ca7f5ddb7dae4ba83, you
>should explicitly handle sashiko's comments.
>
>/P
>
Thank you for pointing this out, I'll address the AI reviews.
Arthur
prev parent reply other threads:[~2026-09-10 12:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 12:35 [PATCH net-next v7 0/3] w5100: restore GPIO-based link detection Arthur Crepin Leblond
2026-09-04 12:35 ` [PATCH net-next v7 1/3] dt-bindings: net: wiznet,w5100: convert to DT schema Arthur Crepin Leblond
2026-09-09 12:38 ` netdev-bot+sashiko
2026-09-04 12:35 ` [PATCH net-next v7 2/3] dt-bindings: net: wiznet,w5100: add link status interrupt Arthur Crepin Leblond
2026-09-09 12:39 ` netdev-bot+sashiko
2026-09-04 12:36 ` [PATCH net-next v7 3/3] w5100: detect carrier state using link status bit and optional interrupt Arthur Crepin Leblond
2026-09-09 12:39 ` netdev-bot+sashiko
2026-09-10 11:27 ` Paolo Abeni
2026-09-10 12:28 ` Arthur Crepin Leblond [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=20260910122808.GA323870@marmottus.net \
--to=arthur@marmottus.net \
--cc=andrew+netdev@lunn.ch \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/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®