From: netdev-bot+sashiko@kernel.org
To: pavan.chebbi@broadcom.com
Cc: michael.chan@broadcom.com, kuba@kernel.org,
andrew+netdev@lunn.ch, andrew.gospodarek@broadcom.com,
davem@davemloft.net, edumazet@kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com, shravya.k-n@broadcom.com
Subject: Re: [PATCH net v3 1/3] tg3: Don't fail probe if 31-bit coherent DMA mask is unsupported
Date: Sun, 22 Nov 2026 11:07:02 +0000 [thread overview]
Message-ID: <179534562215.3135.11736501194773169729@kernel.org> (raw)
In-Reply-To: <20261118105408.1076095-2-pavan.chebbi@broadcom.com>
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] On BCM57766, tg3_alloc_consistent()
(drivers/net/ethernet/broadcom/tg3.c, around line 8870) can find that…
--
tg3: Don't fail probe if 31-bit coherent DMA mask is unsupported
This patch makes the 31-bit coherent DMA mask for BCM57766 best effort.
If the platform refuses that mask, the driver falls back to the coherent
mask used before 614f4d166eee, so probe no longer fails. It also adds a
warning when a status block is allocated at a DMA address that matches
the erratum pattern described in 614f4d166eee.
Link: https://lore.kernel.org/netdev/CALjTZvYKHWrD5m+RXimjxODvpFPw7Cq_EOEuzRi1PZT9_JxF+g@mail.gmail.com/
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index 95827df4cf6a1..2cf9d2ea069b5 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -8867,6 +8867,13 @@ static int tg3_alloc_consistent(struct tg3 *tp)
> if (!tnapi->hw_status)
> goto err_out;
>
> + if (tg3_asic_rev(tp) == ASIC_REV_57766 &&
> + (lower_32_bits(tnapi->status_mapping) & 0xffff0000) ==
> + 0xffff0000)
> + dev_warn(&tp->pdev->dev,
> + "Status block at DMA address %pad may cause TX timeouts on this device\n",
> + &tnapi->status_mapping);
> +
[Severity: Low]
When the status block lands at an address that matches the erratum
pattern, the driver keeps the buffer. tg3_rings_reset() later writes
that address into the chip:
tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH,
((u64) tnapi->status_mapping >> 32));
tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW,
((u64) tnapi->status_mapping & 0xffffffff));
tg3_alloc_consistent() is only called from tg3_start(). A recovery reset
therefore writes the same address again. That covers both the
tg3_process_error() "DMA Status error. Resetting chip." path and a TX
timeout reset. Only closing and reopening the interface gets a new
allocation.
Could the driver hold on to the matching buffer and allocate a
replacement instead? That would keep the workaround in effect on
platforms that refuse the 31-bit mask.
The warning also gives TX timeouts as the symptom. 614f4d166eee says the
hardware sets the overflow bit in the DMA status register, and
tg3_process_error() would report that as a DMA status error.
Are TX timeouts the expected symptom here, or should the message also
mention the DMA status error?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118105408.1076095-1-pavan.chebbi%40broadcom.com
next prev parent reply other threads:[~2026-11-22 11:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 10:54 [PATCH net v3 0/3] tg3: Bug fixes Pavan Chebbi
2026-11-18 10:52 ` netdev-bot+sinfo
2026-11-18 10:54 ` [PATCH net v3 1/3] tg3: Don't fail probe if 31-bit coherent DMA mask is unsupported Pavan Chebbi
2026-11-22 11:07 ` netdev-bot+sashiko [this message]
2026-11-18 10:54 ` [PATCH net v3 2/3] tg3: Skip management FW version when APE firmware is not ready Pavan Chebbi
2026-11-18 10:54 ` [PATCH net v3 3/3] tg3: Fix heap overflow in unbuffered NVRAM write path Pavan Chebbi
2026-11-22 11:07 ` 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=179534562215.3135.11736501194773169729@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew.gospodarek@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=shravya.k-n@broadcom.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