The branch stable/15 has been updated by mav:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=56a6305557db0d545c4f358ea8e154a657d95dfc

commit 56a6305557db0d545c4f358ea8e154a657d95dfc
Author:     Alexander Motin <[email protected]>
AuthorDate: 2026-02-09 19:23:26 +0000
Commit:     Alexander Motin <[email protected]>
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);

Reply via email to