summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorPavan Chebbi <pavan.chebbi@broadcom.com>2026-11-18 16:24:06 +0530
committerPaolo Abeni <pabeni@redhat.com>2026-11-26 11:32:43 +0100
commit686b8dbcedf8773dc505f9f315a0551c0bca70a3 (patch)
tree998e4379ad725c7c5f546ddab0cd774155170b2a /tools/perf/scripts/python
parent4ef60251fd9142ddce4b3236f3cb1ea2e4f3f1fa (diff)
tg3: Don't fail probe if 31-bit coherent DMA mask is unsupported
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. Fixes: 614f4d166eee ("tg3: Set coherent DMA mask bits to 31 for BCM57766 chipsets") Reported-by: Rui Salvaterra <rsalvaterra@gmail.com> Link: https://lore.kernel.org/netdev/CALjTZvYKHWrD5m+RXimjxODvpFPw7Cq_EOEuzRi1PZT9_JxF+g@mail.gmail.com/ Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20261118105408.1076095-2-pavan.chebbi@broadcom.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions