From: Birger Koblitz <mail@birger-koblitz.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev-bot+sashiko@kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, linux@armlinux.org.uk, hkallweit1@gmail.com,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, neuromoments@gmail.com
Subject: Re: [PATCH net-next v12 01/15] phylink: Add phylink_mac_interrupt
Date: Mon, 28 Sep 2026 06:48:49 +0200 [thread overview]
Message-ID: <21485f2f-b446-4a38-86c3-dc8d73260a0d@birger-koblitz.de> (raw)
In-Reply-To: <bb4043d1-e89e-430b-8f68-e64fc2b0d11a@lunn.ch>
Hi Andrew,
On 27/09/2026 4:18 pm, Andrew Lunn wrote:
> On Sun, Sep 27, 2026 at 11:03:17AM +0200, Birger Koblitz wrote:
>>
>>
>> On 17/09/2026 11:24 pm, netdev-bot+sashiko@kernel.org wrote:
>>> Thank you for your contribution! Sashiko AI review found 2 potential
>>> issue(s) to consider:
>>>
>>> Critical: 0 · High: 0 · Medium: 1 · Low: 1
>>>
>>> - [Medium] `phylink_mac_interrupt()`
>>> (drivers/net/phy/phylink.c:1621-1628) reads `pl->phydev` with no…
>>
>> This does not look like an actual problem, as the interrupt is not really an
>> IRQ, it is a call from the MAC layer, calling phy_mac_interrupt(phy) did the
>> same in the past.
>
> We need to be a little bit careful here. phy_mac_interrupt(phy) can be
> called in interrupt context. It does not perform any blocking
> operations, it just queues up the work to handle the actual event.
>
> Here it is used in interrupt context.
> https://elixir.bootlin.com/linux/v7.2.8/source/drivers/net/ethernet/broadcom/asp2/bcmasp.c#L81
>
> I would expect the phylink equivalent to be the same.
>
> Since we are in interrupt context we cannot take a mutex. But do we
> need to worry about phydev disappearing? I don't think so. In
> practice, ignoring unbind via sysfs, the only way for a PHY to
> disappear is for an SFP module to be hot unplugged. But SPF don't
> support interrupts, so there should be no need to use
> phylink_mac_interrupt().
>
> It might be worth adding some comments here?
Thanks for the reference, I understand this better, now. My suggestion
would be to add a comment as part of the function description:
This function may be called in interrupt context, and therefore cannot
take a mutex. However, it is safe to assume that the reference to phy
does not disappear during the call, as only an SFP module may be
unplugged to make a PHY disappear. SFP modules however do not support
interrupts.
Birger
next prev parent reply other threads:[~2026-09-28 4:48 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 3:23 [PATCH net-next v12 00/15] ax88179_178a: Add support for AX88179A-based chips Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 01/15] phylink: Add phylink_mac_interrupt Birger Koblitz
2026-09-17 21:24 ` netdev-bot+sashiko
2026-09-27 9:03 ` Birger Koblitz
2026-09-27 14:18 ` Andrew Lunn
2026-09-28 4:48 ` Birger Koblitz [this message]
2026-09-28 15:27 ` Andrew Lunn
2026-09-16 3:24 ` [PATCH net-next v12 02/15] phylib: Add support for PHYs with broken forced mode Birger Koblitz
2026-09-17 21:24 ` netdev-bot+sashiko
2026-09-27 9:04 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 03/15] ax88179_178a: Fix endianness of pause watermark register Birger Koblitz
2026-09-17 21:24 ` netdev-bot+sashiko
2026-09-27 9:05 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 04/15] ax88179_178a: Split driver into library and device specific code Birger Koblitz
2026-09-17 21:24 ` netdev-bot+sashiko
2026-09-19 22:04 ` Jakub Kicinski
2026-09-27 9:01 ` Birger Koblitz
2026-09-27 9:08 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 05/15] ax88179_178a: Add netdev2data() convenience function Birger Koblitz
2026-09-17 21:24 ` netdev-bot+sashiko
2026-09-27 9:09 ` Birger Koblitz
2026-09-19 22:05 ` Jakub Kicinski
2026-09-27 8:17 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 06/15] ax88179_178a: Add HW support for AX179A-based chips Birger Koblitz
2026-09-17 21:24 ` netdev-bot+sashiko
2026-09-19 22:15 ` Jakub Kicinski
2026-09-19 23:22 ` Birger Koblitz
2026-09-19 23:32 ` Jakub Kicinski
2026-09-27 9:18 ` Birger Koblitz
2026-09-19 22:12 ` Jakub Kicinski
2026-09-27 8:20 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 07/15] ax88179_178a: Add EEE configuration support for AX88179A MACs Birger Koblitz
2026-09-17 21:24 ` netdev-bot+sashiko
2026-09-27 9:20 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 08/15] ax88179_178a: Add EEE configuration support for AX88179A PHYs Birger Koblitz
2026-09-17 21:24 ` netdev-bot+sashiko
2026-09-27 9:21 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 09/15] ax88179_178a: Add VLAN offload support for AX88179A Birger Koblitz
2026-09-17 21:25 ` netdev-bot+sashiko
2026-09-27 9:24 ` Birger Koblitz
2026-09-27 14:24 ` Andrew Lunn
2026-09-28 4:41 ` Birger Koblitz
2026-09-28 12:28 ` Andrew Lunn
2026-09-16 3:24 ` [PATCH net-next v12 10/15] ax88179_178a: Add AX179A/AX279 multicast configuration Birger Koblitz
2026-09-17 21:25 ` netdev-bot+sashiko
2026-09-27 9:25 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 11/15] ax88179_178a: Add Suspend/resume support for AX88179A/772D/279 Birger Koblitz
2026-09-17 21:25 ` netdev-bot+sashiko
2026-09-27 9:36 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 12/15] ax88179_178a: Add ethtool get_drvinfo Birger Koblitz
2026-09-17 21:25 ` netdev-bot+sashiko
2026-09-27 9:37 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 13/15] ax88179_178a: Update driver name and information Birger Koblitz
2026-09-17 21:25 ` netdev-bot+sashiko
2026-09-27 9:38 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 14/15] ax88179_178a: Add support for AX88179A/772D/279 EEPROM access Birger Koblitz
2026-09-17 21:25 ` netdev-bot+sashiko
2026-09-27 9:40 ` Birger Koblitz
2026-09-16 3:24 ` [PATCH net-next v12 15/15] ax88796b: Add support for AX88772D, AX88179A and AX88279 Birger Koblitz
2026-09-17 21:25 ` netdev-bot+sashiko
2026-09-27 9:42 ` Birger Koblitz
2026-09-19 5:28 ` [PATCH v12 0/15] ax88179_178a: Add support for AX88179A-based chips Jianhui Xu
2026-09-19 22:30 ` [PATCH net-next v12 00/15] " patchwork-bot+netdevbpf
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=21485f2f-b446-4a38-86c3-dc8d73260a0d@birger-koblitz.de \
--to=mail@birger-koblitz.de \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=neuromoments@gmail.com \
--cc=pabeni@redhat.com \
/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®