From: sashiko-bot@kernel.org
To: "Iustin Stolniceanu" <iustin.stolniceanu@analog.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next 4/5] net: ethernet: adi: adin1110: Add OA TC6 protocol support for ADIN1110
Date: Wed, 04 Nov 2026 16:10:41 +0000 [thread overview]
Message-ID: <sashiko-outbox-197578@kernel.org> (raw)
In-Reply-To: <20261103160918.409701-5-iustin.stolniceanu@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] net: adin1110: broken uc and mc filtering in adin1110_set_rx_mode_tc6()
--
commit fee140bec5b369ab45ae064be0620e5878578e1e
Author: Ciprian Regus <ciprian.regus@analog.com>
net: ethernet: adi: adin1110: Add OA TC6 protocol support for ADIN1110
This commit adds OPEN Alliance TC6 SPI protocol support for the ADIN1110
MAC-PHY using the oa_tc6 framework when the adi,spi-oa-tc6 property is
present. It introduces OA TC6 register accessors, net_device_ops callbacks,
and probe handling while sharing the existing MAC configuration logic.
> diff --git a/drivers/net/ethernet/adi/adin1110.c b/drivers/net/ethernet/adi/adin1110.c
> index 53fac3dc8be62..d08b165bf7c48 100644
> --- a/drivers/net/ethernet/adi/adin1110.c
> +++ b/drivers/net/ethernet/adi/adin1110.c
[ ... ]
> @@ -881,6 +920,22 @@ static void adin1110_set_rx_mode(struct net_device *dev)
> spin_unlock(&priv->state_lock);
> }
>
> +static int adin1110_set_rx_mode_tc6(struct net_device *dev,
> + struct netdev_hw_addr_list *uc,
> + struct netdev_hw_addr_list *mc)
> +{
> + struct adin1110_port_priv *port_priv = netdev_priv(dev);
> + struct adin1110_priv *priv = port_priv->priv;
> + int ret;
> +
> + mutex_lock(&priv->lock);
> + port_priv->flags = dev->flags;
> + ret = adin1110_setup_rx_mode(port_priv);
> + mutex_unlock(&priv->lock);
> +
> + return ret;
> +}
[ ... ]
> @@ -1123,6 +1233,69 @@ static int adin1110_check_spi(struct adin1110_priv *priv)
> return 0;
> }
>
> +static void adin1110_oa_tc6_remove(void *data)
> +{
> + oa_tc6_exit(data);
> +}
> +
> +static int adin1110_oa_tc6_probe(struct adin1110_priv *priv)
> +{
[ ... ]
> + netdev->if_port = IF_PORT_10BASET;
> + netdev->netdev_ops = &adin1110_tc6_netdev_ops;
> + netdev->ethtool_ops = &adin1110_ethtool_ops;
> + netdev->priv_flags |= IFF_UNICAST_FLT;
> + netdev->netns_immutable = true;
> +
> + return devm_register_netdev(dev, netdev);
> +}
[Severity: Medium]
In adin1110_oa_tc6_probe(), netdev->priv_flags sets IFF_UNICAST_FLT, which
tells netif_rx_mode_run() -> netif_uc_promisc_update() not to fall back to
IFF_PROMISC when secondary unicast addresses are added to dev->uc.
However, adin1110_set_rx_mode_tc6() ignores both the uc and mc address list
snapshots and only calls adin1110_setup_rx_mode():
drivers/net/ethernet/adi/adin1110.c:adin1110_setup_rx_mode() {
ret = adin1110_set_promisc_mode(port_priv,
!!(port_priv->flags & IFF_PROMISC));
if (ret < 0)
return ret;
ret = adin1110_multicast_filter(port_priv, ADIN_MAC_MULTICAST_ADDR_SLOT,
!!(port_priv->flags & IFF_ALLMULTI));
...
}
Because neither dev->uc nor dev->mc is programmed into the hardware MAC
filter slots, and ADIN_MAC_MULTICAST_ADDR_SLOT is only enabled when
IFF_ALLMULTI is set, won't frames destined to secondary unicast addresses
or joined multicast groups (such as IPv6 Neighbor Discovery solicited-node
multicast when IFF_ALLMULTI is not set) be silently dropped in OA TC6 mode?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103160918.409701-1-iustin.stolniceanu@analog.com?part=4
next prev parent reply other threads:[~2026-11-04 16:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 16:09 [PATCH net-next 0/5] net: ethernet: adi: adin1110: Add OPEN Alliance TC6 support Iustin Stolniceanu
2026-11-03 16:09 ` [PATCH net-next 1/5] net: ethernet: oa_tc6: Allow custom reset settle time values Iustin Stolniceanu
2026-11-04 14:10 ` Alvin Šipraga
2026-11-03 16:09 ` [PATCH net-next 2/5] net: ethernet: oa_tc6: Add support for MDIO indirect access Iustin Stolniceanu
2026-11-04 14:08 ` Alvin Šipraga
2026-11-03 16:09 ` [PATCH net-next 3/5] dt-bindings: net: adi,adin1110: Add adi,spi-oa-tc6 Iustin Stolniceanu
2026-11-04 14:12 ` Alvin Šipraga
2026-11-03 16:09 ` [PATCH net-next 4/5] net: ethernet: adi: adin1110: Add OA TC6 protocol support for ADIN1110 Iustin Stolniceanu
2026-11-04 14:26 ` Alvin Šipraga
2026-11-04 21:06 ` Andrew Lunn
2026-11-04 16:10 ` sashiko-bot [this message]
2026-11-03 16:09 ` [PATCH net-next 5/5] net: phy: adin1100: Skip the soft reset on ADIN1110/ADIN2111 Iustin Stolniceanu
2026-11-04 14:29 ` Alvin Šipraga
2026-11-04 21:16 ` Andrew Lunn
2026-11-03 20:49 ` [PATCH net-next 0/5] net: ethernet: adi: adin1110: Add OPEN Alliance TC6 support Andrew Lunn
2026-11-04 8:06 ` Stolniceanu, Iustin
2026-11-04 14:59 ` Andrew Lunn
2026-11-04 15:14 ` Stolniceanu, Iustin
2026-11-03 20:54 ` Andrew Lunn
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=sashiko-outbox-197578@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=iustin.stolniceanu@analog.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.