* [PATCH net v2] net: ethernet: adi: adin1110: mask the RX IRQ of the port being stopped
@ 2026-11-05 1:41 Yuehong Wu
2026-11-05 16:04 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Yuehong Wu @ 2026-11-05 1:41 UTC (permalink / raw)
To: netdev; +Cc: andrew+netdev, kuba, edumazet, pabeni, nichen, linux-kernel
adin1110_net_stop() programs the RX-ready interrupt mask of the wrong
port: it uses ADIN2111_RX_RDY_IRQ (the second port's bit) when stopping
port 0 and ADIN1110_RX_RDY_IRQ (the first port's bit) when stopping
port 1, while adin1110_port_rx_ready() uses the opposite mapping, port 0
-> ADIN1110_RX_RDY and port 1 -> ADIN2111_P2_RX_RDY.
The port being stopped therefore keeps its own RX interrupt enabled
while the peer's is masked. On ADIN2111 that stalls RX on the peer port;
on ADIN1110 the RX interrupt is never masked at all. As the interrupt is
level triggered and adin1110_read_frames() skips the FIFO while
netif_oper_up() is false, the stopped port also keeps re-raising its
interrupt with nobody draining the FIFO.
Swap the two bits so the port being stopped masks its own interrupt.
Found by code review while comparing the bit mapping against
adin1110_port_rx_ready(). I do not have access to ADIN1110 or ADIN2111
hardware, so this was only compile-tested (CONFIG_ADIN1110=m, x86_64),
not exercised on a device.
Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
Signed-off-by: Yuehong Wu <wuyuehong@cmss.chinamobile.com>
---
v2:
- Cc the netdev maintainers, as flagged by the cc_maintainers CI check on v1.
- Explain how the issue was found and that the change was only compile-tested,
no hardware access (netdev guideline for patches found by code review).
v1: https://lore.kernel.org/all/20261103-adin1110-net-stop-1-yuehongwu@cmss.chinamobile.com/
drivers/net/ethernet/adi/adin1110.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/adi/adin1110.c b/drivers/net/ethernet/adi/adin1110.c
index 53fac3d..abdc160 100644
--- a/drivers/net/ethernet/adi/adin1110.c
+++ b/drivers/net/ethernet/adi/adin1110.c
@@ -945,7 +945,7 @@ static int adin1110_net_stop(struct net_device *net_dev)
u32 mask;
int ret;
- mask = !port_priv->nr ? ADIN2111_RX_RDY_IRQ : ADIN1110_RX_RDY_IRQ;
+ mask = !port_priv->nr ? ADIN1110_RX_RDY_IRQ : ADIN2111_RX_RDY_IRQ;
/* Disable RX RDY IRQs */
mutex_lock(&priv->lock);
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net v2] net: ethernet: adi: adin1110: mask the RX IRQ of the port being stopped
2026-11-05 1:41 [PATCH net v2] net: ethernet: adi: adin1110: mask the RX IRQ of the port being stopped Yuehong Wu
@ 2026-11-05 16:04 ` Andrew Lunn
2026-11-06 1:07 ` Yuehong Wu
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2026-11-05 16:04 UTC (permalink / raw)
To: Yuehong Wu
Cc: netdev, andrew+netdev, kuba, edumazet, pabeni, nichen, linux-kernel
> v2:
> - Cc the netdev maintainers, as flagged by the cc_maintainers CI check on v1.
./scripts/get_maintainer.pl drivers/net/ethernet/adi/adin1110.c
Andrew Lunn <andrew+netdev@lunn.ch> (maintainer:NETWORKING DRIVERS)
"David S. Miller" <davem@davemloft.net> (maintainer:NETWORKING DRIVERS)
Eric Dumazet <edumazet@kernel.org> (maintainer:NETWORKING DRIVERS)
Jakub Kicinski <kuba@kernel.org> (maintainer:NETWORKING DRIVERS,commit_signer:1/3=33%)
Paolo Abeni <pabeni@redhat.com> (maintainer:NETWORKING DRIVERS,commit_signer:1/3=33%)
"Nuno Sá" <nuno.sa@analog.com> (commit_signer:1/3=33%)
Heiner Kallweit <hkallweit1@gmail.com> (commit_signer:1/3=33%,authored:1/3=33%,added_lines:1/5=20%,removed_lines:1/2=50%)
Chen Ni <nichen@iscas.ac.cn> (commit_signer:1/3=33%,authored:1/3=33%,added_lines:3/5=60%)
netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
linux-kernel@vger.kernel.org (open list)
Since this is an analogue devices device, don't you think Cc:ing
"Nuno Sá" <nuno.sa@analog.com> would be good?
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net v2] net: ethernet: adi: adin1110: mask the RX IRQ of the port being stopped
2026-11-05 16:04 ` Andrew Lunn
@ 2026-11-06 1:07 ` Yuehong Wu
0 siblings, 0 replies; 3+ messages in thread
From: Yuehong Wu @ 2026-11-06 1:07 UTC (permalink / raw)
To: Andrew Lunn
Cc: netdev, nuno.sa, Jakub Kicinski, Eric Dumazet, Paolo Abeni,
Heiner Kallweit, Chen Ni, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 692 bytes --]
> Since this is an analogue devices device, don't you think Cc:ing
> "Nuno Sá" <nuno.sa@analog.com> would be good?
You are right, sorry about that. I ran get_maintainer.pl in a tree
without git history, so the commit-signers did not show up in my Cc list
at all and I only picked the maintainers and the open lists.
Adding Nuno, Heiner and Chen here. There is no code change, so the v2
currently in patchwork is still the version to review:
https://patchwork.kernel.org/project/netdevbpf/patch/20261104-adin1110-net-stop-v2-1-yuehongwu@cmss.chinamobile.com/
I can resend it as a v3 with the Cc list fixed if you would rather have
the patch in everyone's inbox -- just say the word.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-06 1:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 1:41 [PATCH net v2] net: ethernet: adi: adin1110: mask the RX IRQ of the port being stopped Yuehong Wu
2026-11-05 16:04 ` Andrew Lunn
2026-11-06 1:07 ` Yuehong Wu
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®