Article View: linux.kernel.netdev
Article #21742Re: [PATCH net-next v3 7/7] net: ethernet: adi: adin1110: Add OA TC6 protocol support for ADIN1110
From: netdev-bot+sashiko
Date: Tue, 24 Nov 2026 12:02
Date: Tue, 24 Nov 2026 12:02
156 lines
13411 bytes
13411 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] On the new OA TC6 path, the ADIN1110 hardware reset is left to
oa_tc6_init(), which does not follow the reset constraints the driver…
- [Low] The strap/property hint in adin1110_oa_tc6_probe()
(drivers/net/ethernet/adi/adin1110.c) is printed in the wrong cases.
--
net: ethernet: adi: adin1110: Add OA TC6 protocol support for ADIN1110
This adds OPEN Alliance TC6 SPI protocol support for the ADIN1110. It uses
the oa_tc6 framework and is enabled by the adi,spi-oa-tc6 property.
Register accesses go through read_reg/write_reg callbacks so the MAC
configuration code is shared by both protocols, and the ADIN2111 is
rejected with -ENODEV in TC6 mode.
> diff --git a/drivers/net/ethernet/adi/adin1110.c b/drivers/net/ethernet/adi/adin1110.c
> index 10e7ef33be108..72710d3edd7b3 100644
> --- a/drivers/net/ethernet/adi/adin1110.c
> +++ b/drivers/net/ethernet/adi/adin1110.c
[ ... ]
> @@ -1115,14 +1230,91 @@ static int adin1110_check_spi(struct adin1110_priv *priv)
[ ... ]
> +static int adin1110_oa_tc6_probe(struct adin1110_priv *priv)
> +{
[ ... ]
> + /* oa_tc6_init() attaches the PHY, which looks at netdev_ops. */
> + netdev->netdev_ops = &adin1110_tc6_netdev_ops;
> +
> + quirks.hwreset_settle_us = 50000;
> + quirks.softreset_settle_us = 10000;
> +
> + port_priv->tc6 = oa_tc6_init(priv->spidev, netdev, &quirks);
[Severity: Medium]
Does the reset done by oa_tc6_init() meet the ADIN1110 reset requirements
that this driver documents?
The generic SPI path does this in adin1110_check_spi():
if (reset_gpio) {
/* MISO pin is used for internal configuration, can't have
* anyone else disturbing the SDO line.
*/
spi_bus_lock(priv->spidev->controller);
gpiod_set_value(reset_gpio, 1);
fsleep(10000);
gpiod_set_value(reset_gpio, 0);
/* Need to wait 90 ms before interacting with
* the MAC after a HW reset.
*/
fsleep(90000);
spi_bus_unlock(priv->spidev->controller);
}
The TC6 path does this in oa_tc6_init():
if (tc6->reset_gpio) {
...
fsleep(10);
gpiod_set_value_cansleep(tc6->reset_gpio, 0);
fsleep(tc6->quirks.hwreset_settle_us);
}
The two sequences differ in three ways:
- Reset is held for about 10 us instead of 10 ms.
- The SPI bus is not locked. On a shared bus, another device's transfer
could drive MISO while the ADIN1110 comes out of reset. The earlier
commit in this series, "net: ethernet: oa_tc6: Allow custom reset settle
time values", says the ADIN1110 tristates its SDO pin during reset.
- hwreset_settle_us is 50 ms here. The comment in adin1110_check_spi()
says 90 ms is needed.
If the 90 ms wait or the bus lock is really required, could the first
control access in oa_tc6_check_ctrl_protection() reach a device that is
not ready? That would return -EPROTO, which is then reported as a strap
problem with -ENODEV. Or is the 90 ms comment in adin1110_check_spi()
stale?
> + if (PTR_ERR_OR_ZERO(port_priv->tc6) == -EPROTO)
> + return dev_err_probe(dev, -ENODEV,
> + "no OA TC6 reply, check the SPI_CFG1 strap and adi,spi-oa-tc6\n");
> + if (IS_ERR(port_priv->tc6))
> + return PTR_ERR(port_priv->tc6);
[ ... ]
> + ret = adin1110_read_reg(priv, ADIN1110_PHY_ID, &val);
> + if (ret < 0)
> + return ret;
> +
> + if (val != priv->cfg->phy_id_val)
> + return dev_err_probe(dev, -ENODEV, "PHY ID expected: %x, read: %x\n",
> + priv->cfg->phy_id_val, val);
[Severity: Low]
The commit message says:
If the MAC-PHY gives no valid OA TC6 reply during initialization, or
the PHY ID does not match, probe fails with -ENODEV and a message
pointing at the strap and the property.
This PHY ID mismatch message in adin1110_oa_tc6_probe() has no strap or
property hint. The matching check in adin1110_check_spi() gains one in
this same patch:
"PHY ID expected: %x, read: %x, check the SPI_CFG1 strap and adi,spi-oa-tc6\n"
Should the two messages match?
There is a related question about the -EPROTO check above it. Does
-EPROTO from oa_tc6_init() really mean "no OA TC6 reply"? In oa_tc6.c it
is the generic result of any failed control reply check. For example,
oa_tc6_check_ctrl_read_reply() has:
if (*tx_buf != *rx_buf)
return -EPROTO;
...
if (complement != ~reply)
return -EPROTO;
oa_tc6_check_ctrl_write_reply() also returns -EPROTO when its memcmp()
fails.
These checks run on every control access in every phase of
oa_tc6_init(): the protection check, soft reset, interrupt unmask,
PHY/MDIO init and enabling data transfer. oa_tc6_init() passes the errno
up unchanged.
A correctly strapped device could get one corrupted reply later in init.
Would that be reported as a strap or DT misconfiguration, with probe
returning -ENODEV instead of -EPROTO?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261123115743.29523-1-iustin.stolniceanu%40analog.com
Technical Details
Message-ID:
<179552177040.3135.10993155208943619451@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370300-linux-kernel-netdev=dewy.ruReferences:
<20261123115743.29523-8-iustin.stolniceanu@analog.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370300-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v3 7/7] net: ethernet: adi: adin1110: Add OA TC6 protocol support for ADIN1110 Date: Tue, 24 Nov 2026 12:02:50 +0000 Organization: Usenet Network Message-ID: <179552177040.3135.10993155208943619451@kernel.org> References: <20261123115743.29523-8-iustin.stolniceanu@analog.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="4128919"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:XuxfYiatd9buD2QVNTPh/t4ASco= sha256:Ujmb1nap39dwT8ODn0SctcSZHa5hbWvU8ljP1f8VMH4= sha1:UQ9Azl24+aN5+VIk9R7CZ88WQ4M= sha256:i9Elgi+r1qI4K7O6rDrkY/G446aK2pGh3ArnFZ8CQyA= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id CBE64125E03; Tue, 24 Nov 2026 15:03:13 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bgCgVeg5CgIz; Tue, 24 Nov 2026 15:03:09 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-370300-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 66EB8125DFF; Tue, 24 Nov 2026 15:02:56 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 024C835F49; Tue, 24 Nov 2026 12:02:54 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795521773; b=OViUMhd/SKRC1PBA6QHGxhYp0uPMi7daIkI5kFF0W5OojN94WER1399ZvHK2GoXU9ul9 QJBVUx0DRfZvHbwHCsv/71SiCXjCaXa3RdXlBwPI32GbcUAHk6lpLTec5CCYYdemvSSTJ Pppf9oqAj2SQcApy60yCC5og5D2yv2Nybnl1+AxaAqeYNOEWfK1454FAnWFil4RnwlV3j 8elYPTcnJEBOWB/55iBjmCH+JtbYVOI7HsJgM/Zhzm6VqjU/yHs2PAttZNsvoQp4n483Q qZbj3Zg1BN47/8K7Cxf8t3nq9bevaDKLmn0atp/XK9OE2nzs0aHZU9biBFXMq3PYAyA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795521773; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=rewfV1m5OFcwBF5amvlQEJwVXgllZw90S5HnVUN5hT0=; b=Xd3hOhlKoX+i+Uv4gCy2CZvqOkw5V8DLrqV6hKqaWnKRqFlsXDzVNrXRlxl7q4f5AWeD wpJ5dlJsXHoFrycNJYPQysQKWx5h1OWBNbVsXDWlBPfPQrjfv4sPfVlxgs/svcaUg8diu O26Pq/0nWjAwucGJ1xICdLcBCLrkHRUe3Iqx32JB0oA4qEtroHGUP3x2PowP9N0IaF4MO CpvBJs3foZFGnnsc0J2Fn7Bw0RJRiHG7T8vlN+U7ihBu4BfdkjKcN/SFlxBrgbtXRwkfr Qz+hq6H9a8EZXlvr3V4U/jEZ3GXPazA29FUaNHZv23J9ZPKcCisKLZ4vt8T1u0IBLkg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="d7/CpJlP"; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79DE3606A339; Tue, 24 Nov 2026 12:02:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d7/CpJlP X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795521772; b=grwPIqM8dMhVR6vObihh9B8JaX9nT/KzlzbjQSPO1Y+Iwh3D1F+mm5qqChA3HqAX7BaD KNS7DI4mUly9vLcAek6RCrOna3tjAui02HAWEk0Sj6KLbxNDL6nL1C6hYuiGWYHnPxACW sLsvFrc3tn7ipl0lB6FpBtwf82gZEwLoWlv/6UH92a4BW1iTfqgDxys3wSCvJzISkUDQU A6pGnIL7bdI1gWYKnBq122CO6vPws+88laexBnOiUqSV8LSUoGK0Y82hgq/CQNY4+KgxC D4DaONCpISwVG1J9I3AmugNRvDd2BZwqkT/HKeppkAkfU0xi+DTFneCdBEUJ7J2TaNg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795521772; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=rewfV1m5OFcwBF5amvlQEJwVXgllZw90S5HnVUN5hT0=; b=wPCm8KzjqElNVrdBO11olMt/QwElGyUlBZmZNttSw0TgGZWCr2rq6WAc/Z5xvXxTfjSo t8LCSaxNcYG58C6AhLbILKeScd8v+OdoNkiR6KQ2Dg4DzbUNR+kIK43vzsp0J9vs48M51 ApRpgmmHGu4fWc1WgPDjBOon4EClGYLABo7+BlCg8U3GwZALgG2Rly0Ssf0QZMKoImJsj Ehzv2pAlXTEwFDwtHwbiIS2WgiPlYxuIqxdPkR29XhjU7IC8GgEtNaUpdKgWcqCMpLP8m izMSErPCEoaX0XBmZTel6fEvJXw2n0fct6xM8Q53fA3zaEKURh6biY1F2Pad/WGiPEw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="d7/CpJlP"; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98D6A606A32E; Tue, 24 Nov 2026 12:02:52 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEA1D1F000E0; Tue, 24 Nov 2026 12:02:50 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795521771; bh=rewfV1m5OFcwBF5amvlQEJwVXgllZw90S5HnVUN5hT0=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=d7/CpJlPkIjsmuJJc/koRUsJg/Mm5wogMzwtHuRSxIifQTpK43ny3RQ2+us5ZFNQe Bk6bTil4QTtKX6bpF9kLk8I8pgEJePRboP6Z4Q/VRWbkag7plupWwnxDUV1jzrfKVK dgd+3u89HJnE2IgsyJsvRwWGq47dUz71ArG8DHkdfpv/93MXJcAh4RNJHw0QouLHnN jpXeXxfTrEZviy7OY7xs6Ta1O0b/kKEUe0rJ/G6K0Id7X4tXyq62/aW08dCKe4lDbi 9RZNGWUm97DVMUZysfxigpmVOc8QyHA1FvDIOMCG5wdX7UYYLLYPEmBz3Qu8U7R40p 9B8K4aJBAn1GQ== X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, parthiban.veerasooran@microchip.com, hkallweit1@gmail.com, linux@armlinux.org.uk, marcelo.schmitt@analog.com, alvin.sipraga@analog.com, ciprian.regus@analog.com, Selvamani.Rajagopal@onsemi.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-In-Reply-To: <20261123115743.29523-8-iustin.stolniceanu@analog.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list