Article View: linux.kernel.netdev
Article #21882Re: [PATCH net v3 1/3] tg3: Don't fail probe if 31-bit coherent DMA mask is unsupported
From: Simon Horman
Date: Tue, 24 Nov 2026 15:01
Date: Tue, 24 Nov 2026 15:01
55 lines
10624 bytes
10624 bytes
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>
Technical Details
Message-ID:
<20261124150103.GN31322@horms.kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370487-linux-kernel-netdev=dewy.ruReferences:
<20261118105408.1076095-1-pavan.chebbi@broadcom.com> <20261118105408.1076095-2-pavan.chebbi@broadcom.com> <20261124114338.GK31322@horms.kernel.org> <CALs4sv18PR8cvyV-NN-M3HA7S6dQJeSa-L2TRevEO3RR3ZkBiA@mail.gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370487-linux-kernel-netdev=dewy.ru From: horms@kernel.org (Simon Horman) Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <20261124150103.GN31322@horms.kernel.org> References: <20261118105408.1076095-1-pavan.chebbi@broadcom.com> <20261118105408.1076095-2-pavan.chebbi@broadcom.com> <20261124114338.GK31322@horms.kernel.org> <CALs4sv18PR8cvyV-NN-M3HA7S6dQJeSa-L2TRevEO3RR3ZkBiA@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="4164244"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:6JcyQjQWKwM/eW4LBUZzFD+UmHc= sha256:Tul83MbPxpOM/FtzpOS3w6YM6zXtGbPS6rAm92FqMZo= sha1:yXUXmKfDK949rz1N/JY/3B9MNRU= sha256:imoNqB7BhHpTJqbpwE4ToMkCCwZC+a4HTnXjDBH+tM0= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 102B8125E1B; Tue, 24 Nov 2026 18:01:25 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VFsYlxY3tXau; Tue, 24 Nov 2026 18:01:22 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-370487-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id B7C98125E19; Tue, 24 Nov 2026 18:01:12 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 253BB2E6DD; Tue, 24 Nov 2026 15:01:10 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795532470; b=at7HlS27cyucVlspKzxZQ+l/0oQ5y1FccU34mNU9bW6K9VlVNWm4j7cuIqdEgb6okNCx rim5JNBpy1xexlFLSEu33cO8TwCUx01bk/0zrP4FIRMw0DpDpWXTkTp2EXeMMXFgg4sAD +prw0Tgv5ylgT3aADDUImPzDMlS49ShJYoBqc85pPd0DG01ooFIqaXNmGq5zZXAItNrsv Ur0bsBbsWAsDqdM74S03v1Pye50+thoLsmxovWxQOcKxic+88N8P180qrZ6GioypyU9qk 0BACpPce/UJBbLlTVPfRO5GKLeLMT+HDr6kTSXQqdeESR9x+STqyD8KmqTRwim6I/pQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795532470; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=rSwblT0wDnKcCiXOu3brWaFUlsVqCMVE+zVB8mUsu7Q=; b=K6rhFv0CAAX+5AcsEkdO7sWa8XiOIDq71olotEChNpRqDNcY2zmbf/jO0xNGx1UA5ckG y5REoTxIMXkAM49nIFHm3UGqn9v67ZzWkLGBb8PaTDWus9cTo2AMZAjeZzkck9bpEtmA0 /adBabNZi3X25AOH+nQ64137B2jYJyHQN6YY+vGaCBSq6uSN+zA4/3yGkllXB11l/l1sK ATwmywHgd71VsngJU9j7lbSTnwJElbEou47WStWW3j2utOcOY4vmCL+iAUj3D2gsYk7O2 ciE82vY0XnIN3MYh0ajwmIQ5DlgLnY0TPkP8cHSzZoYGENGkaIf3MQ26SkLyidIi1TQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Uh9Snzvo; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2955606A330; Tue, 24 Nov 2026 15:01:09 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Uh9Snzvo X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795532469; b=36nReVKzGkVbjcsok71j+73dPYa2+wXaYTYiIE8ntc5lcsydHDvGFzgq97HGg9ufq6L0 qdem4o1TVAUSR5DQZVLR75wUwg4DUBLoR69CXXIfZb2Imq1i/vAipdEmWH7SBwtoPpaGv fT4I0slOchPxjMReKZ6hbarRFk/m3PSd4BB/qgOwJiU0h8nxg3zGQGPBXgKi8W5wOFAtt kxlJSofVGWgIm5UoyM1z2sbNQZ8k0Y4UKPllYPdG5euLULllZ8stbc0VP9HGQUtmhPvQr 9IRZ3naV6Wx84lu4jLsIL4FJqJdCvlDuc8bc26KYGS01hM53GOkGyJtlFKBkPpqz+hw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795532469; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=rSwblT0wDnKcCiXOu3brWaFUlsVqCMVE+zVB8mUsu7Q=; b=2nTrTlbfnlVVHyYFdSQb6IlY4yoL1DOkbf4mm2xKilsWlMgxnZEeaUuGHf1fakNMjx0P cP2jAJNFOs3qqDwrVrjGXbTLuctF4yNJCkGuqXbR4aTgqlSVdVwq0c3Bv1H4g3nJMI6fK M0HqgUGhgoIv7db2MbaMF87JyHRMDU8devFkgVon+pHTNywRRhvqbolW+nbWOVc8zNd8O 5O1F3Uf41E82o3SEnfYVg68WVe30hAJ0sc4lXPA+ibMLCUSM6Wm1IB7lufuwT1OfFxUGl Zr8J4ajHIoX3awlAXQXB3848jNcpXtBwE7J0RHjtVsU8SM6mfuqPrbzcnu/1Jx4nwMg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Uh9Snzvo; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CA0F606A32A for <netdev@vger.kernel.org>; Tue, 24 Nov 2026 15:01:08 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AB8A1F000CF; Tue, 24 Nov 2026 15:01:06 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795532468; bh=rSwblT0wDnKcCiXOu3brWaFUlsVqCMVE+zVB8mUsu7Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Uh9SnzvoRiDR7/ClZn333tzNu4AWAPxQPk4g37PaAMhhnJePKxfgK6svTF/Y0BtjE v8DrlygbMGuIS5iabsK0v6SFE48r/+x2Q7BiZi9RsgNSwNVI+VXjHGfT0GBIf/SLV3 08UT/BTQ8VTQVacTrwGprhcgYLV1hOxdR4yeUzMb7T0WXqPrl6F9pfDqr7uWmgLJLm C9pksbnhyX9xWHZAFyicrMYBKnpPm+pQYgAQC2tY4g20C1IS4d3Ktl4Sb7ztclqhmR pE1J0HWbxxINodBrTiq6IFXEjq9oafRrbdha9SG+mdRUIDPm5WhauJ5wwZrbaKifaW 2dkP9LypadY5w== X-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> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <CALs4sv18PR8cvyV-NN-M3HA7S6dQJeSa-L2TRevEO3RR3ZkBiA@mail.gmail.com>