From nobody Sat Aug 8 00:43:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hH2MK0zcdz6mZM2 for ; Sat, 08 Aug 2026 00:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hH2MK0MR0z3wJJ for ; Sat, 08 Aug 2026 00:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786149837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S7x/SroJhr3/t1UIdUyHZ8dQgo/4GejZe2SzD8fQ4uU=; b=EV0z0a1AaKXCDpQoP6N8sp5OmH9u0Kj5Y5mnPkl3bf5wC/lZgfYzYUCDFn872q9S0cITTW 7/nI+xR99MdzNHXA/eCWGBG4E0KHmaMza9mHbqmpVerg0b/HjcgJF08rGHwsLew6/HJo2Y IjT9nDKF9zID74qGd+qUrBrqdOIPuyFf1gPgvBa/wIAtBJDaIWfK+cqSK3l0ua0Fw6qklq llTHNh9l25bIR5eqsBEHZtLByVkVOtm7eS8MKd5pfEnSCdnzIOpTO4RC6Mrg2YioHeEVTS psOr2UgWvChea7yx2PPRZ1u6YHk2qgyrmrdlmGUwFGV2KK298SP8n31ehRxOAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786149837; a=rsa-sha256; cv=none; b=poaRedp2mYCpURQYW/PkkM+M47+q1a2P2tr2I1/OAcxf0LDK6jR6iK5X1tjMYzcwKdREcy PdSkX3l2JSTkOTv41N3p0Ye0fMi8O8gmH/jU7oWZ9Z5Liaj9zs9Ih1OEMpDIna0sNOsfgo gglMUOFpUTE10d167gL6DMk+SpCWVsQuqQaNDaXUJPhM17SIoS4yBUIQOyt/Gsxxw5oGiE pzaLIxT5yWpZFJhzy8SOhP8yS6ElHKEcxyQhQYeyplqcGFxZMLDJVabs8ncKLt+cLSJoWi ifutCWsJXNBv6k+OewkCEmC67rgNUId5NnpyUMhmtWDvkd7XllgfoE78DG8NXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786149837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S7x/SroJhr3/t1UIdUyHZ8dQgo/4GejZe2SzD8fQ4uU=; b=n0dxroBb3zbFzs028HA0d4RH27LymgwmXWGkDsKtZ/i9F2cBvTTTD8FccONQp3oaeM3i5/ Zl4BdtdCZmxM4/04gN9xSmVRUiKs3LmwT94kf1XZLKUjxfXcHh2fK9Jju3CuicIM0P8Klc MmB9Yg4HZOkSClsGffa7JH5l+x0w51ln5ASxlfjv46hkQeDf3x2/QJzuydp/6In61Q2Hb3 EEvTEUX9S+LH0krSSuWgHda2QjaZ6rcOPhMt52y5CIFih/nrQ0EElrzBa4nLNFjvtVfJG8 TUKPTLa7HFaTJDfedBUZyqn1rhR6NzTGwZ1Nf6ILZlB3XMWu0iBV0CT6HDTP+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hH2MJ60H6zlL for ; Sat, 08 Aug 2026 00:43:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 402f8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 08 Aug 2026 00:43:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 198908895f18 - stable/14 - e1000: restrict conventional PCI DMA to 32 bits List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 198908895f18c81d4e645199b5992d6e65922c2f Auto-Submitted: auto-generated Date: Sat, 08 Aug 2026 00:43:56 +0000 Message-Id: <6a767bcc.402f8.3953470b@gitrepo.freebsd.org> The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=198908895f18c81d4e645199b5992d6e65922c2f commit 198908895f18c81d4e645199b5992d6e65922c2f Author: Kevin Bowling AuthorDate: 2026-07-31 07:02:22 +0000 Commit: Kevin Bowling CommitDate: 2026-08-08 00:39:45 +0000 e1000: restrict conventional PCI DMA to 32 bits Some conventional PCI e1000 configurations hang when given DMA addresses above 4 GB, particularly on systems using AMD HyperTransport-to-PCI bridges. Linux has restricted e1000 to DMA32 in PCI mode since 2011 for the same failure class in commit e508be174ad36b0cf9b324cd04978c2b13c21502. Set iflib's DMA width after determining the negotiated bus type. This covers descriptor and packet-buffer mappings while preserving 64-bit DMA for PCI-X and PCIe devices and providing a conditional tunable. PR: 297064 Reported by: Alexander Leidinger Tested by: Alexander Leidinger (cherry picked from commit 41759495769dff87cd4ebbb257d4054128ea5b42) --- sys/dev/e1000/if_em.c | 21 +++++++++++++++++++++ sys/dev/e1000/if_em.h | 1 + 2 files changed, 22 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 98c2a5c640a7..867f5cc0cd69 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1224,6 +1224,27 @@ em_if_attach_pre(if_ctx_t ctx) em_setup_msix(ctx); e1000_get_bus_info(hw); + /* + * Some conventional PCI systems hang when e1000 devices use + * DMA addresses above 4 GB. Keep PCI-mode DMA below that boundary + * by default; PCI-X and PCIe retain 64-bit DMA. + */ + if (hw->bus.type == e1000_bus_type_pci) { + SYSCTL_ADD_BOOL(ctx_list, child, OID_AUTO, "allow_64bit_dma", + CTLFLAG_RDTUN, &sc->allow_64bit_dma, 0, + "Allow 64-bit DMA in conventional PCI mode"); + if (sc->allow_64bit_dma) + device_printf(dev, "64-bit DMA in conventional PCI mode. " + "Some chipsets are unstable.\n"); + else { + scctx->isc_dma_width = 32; + device_printf(dev, "32-bit DMA in conventional PCI mode. " + "Set dev.%s.%d.allow_64bit_dma=1 at boot to enable " + "64-bit DMA if the chipset is stable with it.\n", + device_get_name(dev), device_get_unit(dev)); + } + } + /* Set up some sysctls for the tunable interrupt delays */ if (hw->mac.type < igb_mac_min) { em_add_int_delay_sysctl(sc, "rx_int_delay", diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 16da6684c30d..272bb5a7ba3f 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -543,6 +543,7 @@ struct e1000_softc { int if_flags; int em_insert_vlan_header; u32 ims; + bool allow_64bit_dma; bool in_detach; u32 flags;