From nobody Tue Feb 24 21:41:08 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 4fLB441zr0z6T1pl for ; Tue, 24 Feb 2026 21:41:08 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLB441Pt6z42M7 for ; Tue, 24 Feb 2026 21:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771969268; 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=/9qv4vm8ER+gu06Q8VOe+0CbW1SYBI2ZLXp3Uzxj4Wk=; b=pB8Anx8oeu3jPX0+hZRGVUFXPzlLzdI81Ig5VwOXh53nUiIYLvYp2++Buq2k3OBzzEMLJK eElQAoJ89HEk2Duz764hwU+ci6T/qUNZL5obSVSnb9OTKvVN/2e2ZtIuhdz5AAvsgjABMK kGmZbwxyASV0mkvPheBCkxHOn8J0ixbjGDPWm24zhRCHSVW3IsRqgBMInS78pE42Tw+xnw 8tbFsRMKQZiQzrzIIxfkq/zuSUk8zRD2l5JYNTFY+pw7mfusBr01Xzr+5xsNFi7G3WsmC7 YFYFj2KunU/EE+pVan7rMkfvybosrNJeNTxi1BW4q5b2ky4lDPstPmHcCk700w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771969268; a=rsa-sha256; cv=none; b=G2qG6XE99y7xMlniCiSrgaq1DSa1okRfdWyt0cTHY+yLGZe/ZcyHhjV7ALlIuF/wjOyEvX ujhSZBkfhL9AmeXgEp22EWIRsrLg4zkwpa8gAVCrAlcFStp0U+duJvtHoggD5MmPrBJnar pLNSx3SBZzTLsRj490iAYtkZhUtE/oPS0TouLgpnBUixi6A0R7UYB4zCe+Vd8YPkNHa48u xChojdlHgO5esDu2/02jIkv/mj2gUnqDSFnFEBG0RxsuvKbtppEPgWrhFIoCN1kvv2JZuG YuVn/BWStT0O/Sqzcf5619mSsbNzB1DHxcXoV+x4MlPnq2r7h/7g5+I9g1MdLA== 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=1771969268; 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=/9qv4vm8ER+gu06Q8VOe+0CbW1SYBI2ZLXp3Uzxj4Wk=; b=fJIdxSrf2wAdQlkl6HsftKdJdAqnh7wvBc+n/rlePZvFFdriwdS4/pWcRQF5Qx0vnX7fMT UECSESnLAx5CTc8QEU+/Vr40W8MKnL5X9HV6lsutTMwzYTG1645pkbIaHrwOQQl7CT0756 8xBxwbcybhf4lHQaLm0Ztb+lRyQy+1AgVw4nCgjDbRqoOZCB0M+4p09sXhVQGAsPhmKRBq jd0dMX8OgXtVg/cbXypZNqQdjLVBQ44kkY8GP0sR12f4zSPz4JFSP6gXdU0sdBPfXdnRhC rBt05z6BJJ70+VA2sKOu/2qqeUiRuBbnNVQkRJ0Mwivi/gPHd6glrit6jKSu1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLB440pyyzZcW for ; Tue, 24 Feb 2026 21:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3227a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 21:41:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 56a6305557db - stable/15 - ahci: Restrict NVMe redirection by BAR size 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 56a6305557db0d545c4f358ea8e154a657d95dfc Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 21:41:08 +0000 Message-Id: <699e1af4.3227a.29d13108@gitrepo.freebsd.org> The branch stable/15 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=56a6305557db0d545c4f358ea8e154a657d95dfc commit 56a6305557db0d545c4f358ea8e154a657d95dfc Author: Alexander Motin AuthorDate: 2026-02-09 19:23:26 +0000 Commit: Alexander Motin CommitDate: 2026-02-24 21:40:41 +0000 ahci: Restrict NVMe redirection by BAR size Attempts to access vendor-specific registers on emulator of older Intel hardware was reported to confuse one. Since the redirection obviously require BAR size bigger than normal 2KB of AHCI, add the condition, similar to what Linux is doing. Requested by: kib MFC after: 2 weeks (cherry picked from commit b9d3945831fc7a60f2065c7a0afc747dc5653c9f) --- sys/dev/ahci/ahci_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 2b4cb37275a6..ed1b734f70be 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -523,7 +523,8 @@ ahci_pci_attach(device_t dev) * here, or the user has to change the mode in the BIOS * from RST to AHCI. */ - if (pci_get_vendor(dev) == 0x8086) { + if (pci_get_vendor(dev) == 0x8086 && + rman_get_size(ctlr->r_mem) >= 512 * 1024) { uint32_t vscap; vscap = ATA_INL(ctlr->r_mem, AHCI_VSCAP);