Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by netdev-bot+sashiko
Sun, 15 Nov 2026 12:58
Re: [PATCH net v2 3/4] tg3: Skip querying for management FW when no NCSI present
Author: netdev-bot+sashiko
Date: Sun, 15 Nov 2026 12:58
Date: Sun, 15 Nov 2026 12:58
75 lines
10640 bytes
10640 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] tg3: missing APE FW readiness check in tg3_read_dash_ver() and
wrong Fixes tag
--
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -16045,19 +16045,21 @@ static void tg3_probe_ncsi(struct tg3 *tp)
>
> static void tg3_read_dash_ver(struct tg3 *tp)
> {
> - int vlen;
> - u32 apedata;
> char *fwtype;
> -
> - apedata = tg3_ape_read32(tp, TG3_APE_FW_VERSION);
> + u32 apedata;
> + int vlen;
>
> if (tg3_flag(tp, APE_HAS_NCSI))
> fwtype = "NCSI";
> else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5725)
> fwtype = "SMASH";
> + else if (tg3_asic_rev(tp) == ASIC_REV_5719 ||
> + tg3_asic_rev(tp) == ASIC_REV_5720)
> + return;
> else
> fwtype = "DASH";
>
> + apedata = tg3_ape_read32(tp, TG3_APE_FW_VERSION);
> vlen = strlen(tp->fw_ver);
>
> snprintf(&tp->fw_ver[vlen], TG3_VER_SIZE - vlen, " %s v%d.%d.%d.%d",
[Severity: Low]
tg3_read_fw_ver() calls tg3_read_dash_ver() unconditionally after
tg3_probe_ncsi(). That happens even when tg3_probe_ncsi() returned
early because TG3_APE_SEG_SIG did not match APE_SEG_SIG_MAGIC or
APE_FW_STATUS_READY was not set. Isn't the real problem "no APE
firmware is present or ready", rather than something specific to
5719/5720?
With this change only 5719/5720 are skipped. Other ENABLE_APE parts
such as 5717/5718, 5725, 5761, 5762 and 57764/57767/57787 may have no
management firmware. On those, tg3_read_dash_ver() will still read
TG3_APE_FW_VERSION out of uninitialized APE shared memory. It then
appends a bogus DASH or SMASH version to tp->fw_ver, and ethtool -i
reports that.
Before 165f4d1cb3d7 ("tg3: Fix the setting of the APE_HAS_NCSI
flag"), tg3_read_dash_ver() did the signature and ready checks
itself. tg3_ape_scratchpad_read() and tg3_ape_send_event() still do
them before touching APE shared memory.
Could tg3_probe_ncsi() instead report whether valid, ready APE
firmware was found? tg3_read_fw_ver() would then only call
tg3_read_dash_ver() in that case. Or is there a reason 5719/5720
need to be special cased even when the APE signature and ready bit
look valid?
Separately, ecc796486f0a ("tg3: Detect APE firmware types") still
had those guards in tg3_read_dash_ver(). So it does not look like
the commit that introduced this. Should the Fixes tag point at
165f4d1cb3d7 instead?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261111123917.910416-1-pavan.chebbi%40broadcom.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads