From: Arthur Crepin Leblond <arthur@marmottus.net>
To: netdev-bot+sashiko@kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, 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
Subject: Re: [net-next,v6,3/3] w5100: detect carrier state using link status bit and optional interrupt
Date: Thu, 3 Sep 2026 17:10:50 +0200 [thread overview]
Message-ID: <20260903151050.GA185059@marmottus.net> (raw)
In-Reply-To: <20260903130820.GA21664@marmottus.net>
On Thu, Sep 03, 2026 at 03:08:24PM +0200, Arthur Crepin Leblond wrote:
>On Thu, Sep 03, 2026 at 12:56:04AM +0000, netdev-bot+sashiko@kernel.org wrote:
>>Since || short-circuits, w5100_get_link() is not called at all when link_irq
>>is negative and the carrier is unconditionally turned on. The ethtool
>>callback added just above, however, keys on the chip id rather than on
>>link_irq:
>>
>> if (priv->ops->chip_id == W5500)
>> return w5500_get_phycfgr_lnk(ndev);
>>
>
>Again, good catch! One could setup the w5500 without the link IRQ but
>still use the PHCFGR register for the carrier state.
One more time about this one, if we use w5500 without an interrupt the
carrier state will be the one read from PHYCFGR bit and will never
change.
w5100_open:
w5100_get_link -> 0
netif_carrier_off // stays off forever?
There is probably no good solution, the user can only get the real
state with .get_link.
I think netif_carrier_on should initially be called if there
is no interrupt configured, that way the state stays on like on
w5100/w5200.
Arthur
prev parent reply other threads:[~2026-09-03 15:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 12:53 [PATCH net-next v6 0/3] w5100: restore GPIO-based link detection Arthur Crepin Leblond
2026-08-31 12:53 ` [PATCH net-next v6 1/3] dt-bindings: net: wiznet,w5100: convert to DT schema Arthur Crepin Leblond
2026-09-03 0:56 ` [net-next,v6,1/3] " netdev-bot+sashiko
2026-08-31 12:53 ` [PATCH net-next v6 2/3] dt-bindings: net: wiznet,w5100: add link status interrupt Arthur Crepin Leblond
2026-09-01 9:58 ` Krzysztof Kozlowski
2026-09-03 0:56 ` [net-next,v6,2/3] " netdev-bot+sashiko
2026-08-31 12:53 ` [PATCH net-next v6 3/3] w5100: detect carrier state using link status bit and optional interrupt Arthur Crepin Leblond
2026-09-03 0:56 ` [net-next,v6,3/3] " netdev-bot+sashiko
2026-09-03 13:08 ` Arthur Crepin Leblond
2026-09-03 15:10 ` 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=20260903151050.GA185059@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=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev-bot+sashiko@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