All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nuno Sá" <nuno.sa@analog.com>
To: Yuehong Wu <wuyuehong@cmss.chinamobile.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Kees Cook <kees@kernel.org>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Chen Ni <nichen@iscas.ac.cn>,
	Alexandru Tachici <alexandru.tachici@analog.com>,
	Lennart Franzen <lennart@lfdomain.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v3] net: ethernet: adi: adin1110: mask the RX IRQ of the port being stopped
Date: Fri, 6 Nov 2026 17:00:05 +0000	[thread overview]
Message-ID: <au4HUh8r06PzhnZO@nsa> (raw)
In-Reply-To: <20261106-adin1110-net-stop-v3-1-yuehongwu@cmss.chinamobile.com>

On Fri, Nov 06, 2026 at 10:02:51AM +0800, Yuehong Wu wrote:
> 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>
> ---

LGTM. But looking at the commit message, I suspect you're also missing
an Assisted-by tag :). Anyways:

Reviewed-by: Nuno Sá <nuno.sa@analog.com>

> v2 -> v3: no code change.  Cc the ADI commit-signers that
> get_maintainer.pl reports once a git history is available (Nuno Sa,
> Heiner Kallweit, Chen Ni).  Thanks to Andrew Lunn for pointing out that
> Nuno was missing.
> 
> 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
> 
> 
> 

  reply	other threads:[~2026-11-06 17:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 11:47 [PATCH net] net: ethernet: adi: adin1110: mask the RX IRQ of the port being stopped Yuehong Wu
2026-11-03 11:53 ` netdev-bot+sinfo
2026-11-03 12:09   ` Yuehong Wu
2026-11-05  1:41 ` [PATCH net v2] " Yuehong Wu
2026-11-05 16:04   ` Andrew Lunn
2026-11-06  1:07     ` Yuehong Wu
2026-11-06  2:02   ` [PATCH net v3] " Yuehong Wu
2026-11-06 17:00     ` Nuno Sá [this message]
2026-11-08  4:05     ` [PATCH net v4] " Yuehong Wu
2026-11-10 21:37       ` Jakub Kicinski
2026-11-10  5:04     ` [PATCH net v3] " netdev-bot+sashiko
2026-11-09  1:54   ` [PATCH net v2] " netdev-bot+sashiko
2026-11-07 14:34 ` [PATCH net] " netdev-bot+sashiko
2026-11-08  4:06   ` Yuehong Wu

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=au4HUh8r06PzhnZO@nsa \
    --to=nuno.sa@analog.com \
    --cc=alexandru.tachici@analog.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lennart@lfdomain.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=pabeni@redhat.com \
    --cc=wuyuehong@cmss.chinamobile.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.