From: "Björn Töpel" <bjorn@kernel.org>
To: Til Kaiser <mail@tk154.de>, netdev@vger.kernel.org
Cc: Til Kaiser <mail@tk154.de>,
stable@vger.kernel.org, Ido Schimmel <idosch@nvidia.com>,
Petr Machata <petrm@nvidia.com>,
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>,
Jiri Pirko <jiri@resnulli.us>,
Vadim Pasternak <vadimp@mellanox.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] mlxsw: Initialize register query payloads
Date: Thu, 15 Oct 2026 09:48:14 +0200 [thread overview]
Message-ID: <87a4of8kw1.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <20261014173117.26305-1-mail@tk154.de>
Til Kaiser <mail@tk154.de> writes:
> MFGD register queries can exhaust EMAD retries and leave Mellanox
> Spectrum switches stuck during boot or shutdown when running OpenWrt
> built with GCC 15.
>
> An example failure is shown below with the second line wrapped:
>
> EMAD retries (5/5) (tid=9b544fc100001f35)
> EMAD reg access failed (tid=9b544fc100001f35,reg_id=90f0(mfgd),
> type=query,status=0(operation performed))
>
> On an SN2100, the failure occurs during driver teardown on reboot.
> On an SN3420, it occurs while probing mlxsw_spectrum during boot.
>
> The register query API transmits the supplied payload to the device
> before replacing it with the response. Both MFGD callers pass an
> uninitialized stack buffer, so the request contains arbitrary register
> field values and reserved bits. This makes the request depend on stack
> contents and compiler code generation.
>
> Initialize both MFGD query buffers in the firmware fatal event
> configuration and reporter test paths. The initialization has been
> confirmed to eliminate the boot and shutdown hangs on both switches.
> The subsequent read-modify-write still preserves the other fields
> returned by the device.
>
> Also initialize the FORE fan fault query and the MOGCR mirroring policer
> base query, which pass entirely uninitialized payloads. Restore the MTMP
> query initialization in the temperature history reset path, where only
> the slot and sensor index fields are set before querying the register.
>
> This follows commit 5b0907407e7f ("mlxsw: core: Zero payload buffers for
> couple of registers"), which initialized other query payloads after a
> firmware field length bug caused firmware to consume uninitialized data.
Hmm, isn't this pointing to that the query should be more robust,
instead of relying on zeroing receive buffers pre-call? Maybe just fixup
query instead?
Björn
prev parent reply other threads:[~2026-10-15 7:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 17:31 [PATCH net] mlxsw: Initialize register query payloads Til Kaiser
2026-10-15 7:48 ` Björn Töpel [this message]
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=87a4of8kw1.fsf@all.your.base.are.belong.to.us \
--to=bjorn@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=idosch@nvidia.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@tk154.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=stable@vger.kernel.org \
--cc=vadimp@mellanox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox