From: netdev-bot+sashiko@kernel.org
To: iustin.stolniceanu@analog.com
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,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/7] net: ethernet: oa_tc6: Allow custom reset settle time values
Date: Thu, 12 Nov 2026 12:00:38 +0000 [thread overview]
Message-ID: <179448483815.2199510.2819430860684021311@kernel.org> (raw)
In-Reply-To: <20261109085952.105331-3-iustin.stolniceanu@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
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] oa_tc6_init() (drivers/net/ethernet/oa_tc6.c) runs the
hardware reset sequence without holding the SPI bus.
--
net: ethernet: oa_tc6: Allow custom reset settle time values
This commit adds hwreset_settle_us and softreset_settle_us fields to
struct oa_tc6_quirks. MAC-PHY drivers can use them to set the wait after
deasserting the reset GPIO and the wait after the software reset. The
hardware reset wait stays at 1 ms by default, and there is still no
software reset wait unless a driver sets one.
> diff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c
> index 364027c39fa4a..549997ba363ad 100644
> --- a/drivers/net/ethernet/oa_tc6.c
> +++ b/drivers/net/ethernet/oa_tc6.c
[ ... ]
> @@ -1515,12 +1524,12 @@ struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev,
> "failed to get reset gpio\n"));
>
> if (tc6->reset_gpio) {
> - /* Keep the reset asserted for 10 us and then allow 1 ms of
> - * settle time for the crystal oscillator startup.
> + /* Keep the reset asserted for 10 us and then allow the reset
> + * settle time (1 ms by default).
> */
> fsleep(10);
> gpiod_set_value_cansleep(tc6->reset_gpio, 0);
> - fsleep(1000);
> + fsleep(tc6->hwreset_settle_us);
[Severity: Medium]
Should this reset sequence in oa_tc6_init() hold the SPI bus while
the MAC-PHY settles?
The commit message says the ADIN1110 tristates its SDO pin during
reset. For the same chip, adin1110_check_spi() in
drivers/net/ethernet/adi/adin1110.c locks the bus for the whole
reset and settle window:
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);
...
fsleep(90000);
spi_bus_unlock(priv->spidev->controller);
}
Here, reset is asserted by devm_gpiod_get_optional(..., GPIOD_OUT_HIGH),
then deasserted and held for hwreset_settle_us. No spi_bus_lock() or
spi_bus_unlock() surrounds any of these steps.
The last patch in the series, "net: ethernet: adi: adin1110: Add OA
TC6 protocol support for ADIN1110", does this in
adin1110_oa_tc6_probe():
quirks.hwreset_settle_us = 50000;
quirks.softreset_settle_us = 10000;
port_priv->tc6 = oa_tc6_init(priv->spidev, netdev, &quirks);
In that mode adin1110_check_spi() is never called. The bus-locked reset
is replaced by this unlocked sequence, and the window grows from 1 ms
to 50 ms.
Can a transfer by another device on the same spi_controller drive MISO
in that window and make the ADIN1110 latch a strap that differs from
the board configuration? The later software reset in
oa_tc6_sw_reset_macphy() does not appear to re-sample straps.
Whether this happens depends on which strap is on SDO and when the
part samples it. Those are datasheet details I couldn't verify from
the tree. If the protocol strap were flipped, the first OA TC6 transfer
would fail with -EPROTO. adin1110_oa_tc6_probe() would then fail the
probe with -ENODEV, and this would happen only sometimes, depending on
timing.
Later patches in the series don't seem to add a bus lock to this path.
Would wrapping the reset assert, deassert and settle in oa_tc6_init()
with spi_bus_lock() and spi_bus_unlock() be appropriate here?
> }
>
> /* Check the PROTE bit status so that we can reset the device */
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261109085952.105331-1-iustin.stolniceanu%40analog.com
next prev parent reply other threads:[~2026-11-12 12:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 8:59 [PATCH net-next v2 0/7] net: ethernet: adi: adin1110: Add OPEN Alliance TC6 support Iustin Stolniceanu
2026-11-09 8:59 ` [PATCH net-next v2 1/7] net: ethernet: oa_tc6: Forward declare struct mii_bus Iustin Stolniceanu
2026-11-10 9:42 ` Alvin Šipraga
2026-11-09 8:59 ` [PATCH net-next v2 2/7] net: ethernet: oa_tc6: Allow custom reset settle time values Iustin Stolniceanu
2026-11-09 17:10 ` Selvamani Rajagopal
2026-11-12 12:00 ` netdev-bot+sashiko [this message]
2026-11-09 8:59 ` [PATCH net-next v2 3/7] net: ethernet: oa_tc6: Add support for MDIO indirect access Iustin Stolniceanu
2026-11-12 12:00 ` netdev-bot+sashiko
2026-11-09 8:59 ` [PATCH net-next v2 4/7] net: phy: adin1100: Add separate driver entries for ADIN1110/ADIN2111 Iustin Stolniceanu
2026-11-10 9:46 ` Alvin Šipraga
2026-11-12 12:00 ` netdev-bot+sashiko
2026-11-09 8:59 ` [PATCH net-next v2 5/7] net: phy: adin1100: Skip the soft reset on ADIN1110/ADIN2111 Iustin Stolniceanu
2026-11-10 9:48 ` Alvin Šipraga
2026-11-12 12:00 ` netdev-bot+sashiko
2026-11-09 8:59 ` [PATCH net-next v2 6/7] dt-bindings: net: adi,adin1110: Add adi,spi-oa-tc6 Iustin Stolniceanu
2026-11-10 8:05 ` Krzysztof Kozlowski
2026-11-09 8:59 ` [PATCH net-next v2 7/7] net: ethernet: adi: adin1110: Add OA TC6 protocol support for ADIN1110 Iustin Stolniceanu
2026-11-10 9:02 ` sashiko-bot
2026-11-10 9:54 ` Alvin Šipraga
2026-11-12 12:00 ` netdev-bot+sashiko
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=179448483815.2199510.2819430860684021311@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=alvin.sipraga@analog.com \
--cc=andrew+netdev@lunn.ch \
--cc=ciprian.regus@analog.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=iustin.stolniceanu@analog.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marcelo.schmitt@analog.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parthiban.veerasooran@microchip.com \
--cc=robh@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox