Re: [PATCH net] net: ethernet: adi: adin1110: mask the RX IRQ of the port being stopped

From
Yuehong Wu <hidden>
Date
2026-11-08 04:08:01
Also in
lkml
Reply to
netdev-bot+sashiko@kernel.org, 2026-11-07
Hi Sashiko,

Thanks, the finding is correct: adin1110_net_open() writes IMASK1 with an
absolute value that includes ADIN2111_RX_RDY_IRQ whenever the chip is an
ADIN2111, so opening either port re-enables the RX-ready interrupt of a
peer port that is still down and undoes the mask from adin1110_net_stop().

v4 keeps a stopped peer port masked: the peer's bit is only added to the
value written to IMASK1 when netif_running() is true for that port.  The
write stays absolute, so the bit is still enabled while the peer is
running, and netif_running() is __LINK_STATE_START, with ndo_open() and
ndo_stop() serialised by RTNL.  priv->irq_mask keeps its previous value
and meaning (the STATUS1 write-one-to-clear mask), so the clearing
behaviour is unchanged.  IMASK1 is written in exactly two places, both
under priv->lock.  Single-port ADIN1110 writes exactly the same values as
before.

On the FIFO question: I do not think it needs to be drained on stop.
While the port is down its RX-ready bit is masked, so it cannot raise an
interrupt, and whatever is left in its FIFO is drained by
adin1110_read_frames() when the port is opened again.  Draining in the
stop path would mean reading the port FIFO from a second context while
the peer may be running.

The patch only changes the mask programming; the pre-existing probe-time
mask state, the TX/SPI interrupt policy and the operstate gating in
adin1110_port_rx_ready() are untouched.

Testing: no ADIN1110 or ADIN2111 hardware; compile-tested with gcc, W=1,
CONFIG_ADIN1110=m and =y, full kernel builds.

Thanks,
Yuehong

pw-bot: cr


Thread (5 messages) 5 messages, 3 authors, last reply 10h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help