Netdev List
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Pavan Chebbi <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, Rui Salvaterra <rsalvaterra@gmail.com>
Subject: Re: [PATCH net v3 1/3] tg3: Don't fail probe if 31-bit coherent DMA mask is unsupported
Date: Tue, 24 Nov 2026 15:01:03 +0000	[thread overview]
Message-ID: <20261124150103.GN31322@horms.kernel.org> (raw)
In-Reply-To: <CALs4sv18PR8cvyV-NN-M3HA7S6dQJeSa-L2TRevEO3RR3ZkBiA@mail.gmail.com>

On Tue, Nov 24, 2026 at 06:18:05PM +0530, Pavan Chebbi wrote:
> On Tue, Nov 24, 2026 at 5:13 PM Simon Horman <horms@kernel.org> wrote:
> >
> > On Wed, Nov 18, 2026 at 04:24:06PM +0530, Pavan Chebbi wrote:
> > > Commit 614f4d166eee ("tg3: Set coherent DMA mask bits to 31 for
> > > BCM57766 chipsets") lowered the coherent DMA mask to 31 bits as a
> > > workaround for a spurious address overflow error in the hardware.
> > > The result of dma_set_coherent_mask() is fatal to probe, so on
> > > platforms that cannot satisfy such a mask the device fails to probe:
> > >
> > >   tg3 0000:01:00.0: Unable to obtain 64 bit DMA for consistent allocations
> > >   tg3 0000:01:00.0: probe with driver tg3 failed with error -5
> > >
> > > This was reported on a Mac mini (Macmini6,2, BCM57766) running a
> > > kernel built without CONFIG_ZONE_DMA and with IOMMU passthrough as
> > > the default. Without CONFIG_ZONE_DMA, dma_direct_supported() only
> > > accepts a mask narrower than 32 bits if it covers the highest
> > > physical memory address, so with direct mapping a 31-bit coherent
> > > mask is rejected whenever memory extends above 2GB.
> > >
> > > Treat the 31-bit mask as best effort.  If it is refused, warn and fall
> > > back to the mask used before 614f4d166eee, so that the device still
> > > probes.  Platforms that accept the mask are unaffected.  Where it is
> > > refused, 614f4d166eee never protected the device, it only stopped it
> > > from probing, so this restores the behaviour of kernels before that
> > > commit.  Warn when a status block lands at an address matching the
> > > pattern described in 614f4d166eee, so that a resulting TX timeout can
> > > be identified.
> >
> > Hi Pavan,
> >
> > I am not following how a BCM57766 device can be used on a system that
> > rejects a 31-bit mask. Is the idea that TX timeouts are infrequent
> > and can be lived with in such an environment?
> >
> 
> Hi Simon, thanks for the review.  The report comes from a late-2012 Mac mini
> (Macmini6.2) with a BCM57766.  Its NIC worked until 614f4d166eee made the
> 31-bit coherent mask change, which that machine does not accept, so probe has
> failed there since.
> 
> To your question, yes,  I think it can be lived with.  The erratum is
> triggered only
> when the status block lands at a specific address, and if it does, the
> driver's reset
> logic kicks in and the warning points to the cause.  That is better
> than the device
> not probing at all.  Platforms that accept the mask are unaffected.

Hi Pravan,

Thanks for the clarification. I agree this is a reasonable trade-off.

Reviewed-by: Simon Horman <horms@kernel.org>



  reply	other threads:[~2026-11-24 15:01 UTC|newest]

Thread overview: 13+ 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
2026-11-24 11:43   ` Simon Horman
2026-11-24 12:48     ` Pavan Chebbi
2026-11-24 15:01       ` Simon Horman [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-24 11:46   ` Simon Horman
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
2026-11-22 11:43     ` Pavan Chebbi
2026-11-24 11:54       ` Simon Horman

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=20261124150103.GN31322@horms.kernel.org \
    --to=horms@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=rsalvaterra@gmail.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