Index | Thread | Search

From:
Jan Klemkow <jan@openbsd.org>
Subject:
ahci(4): Disable PMP for AMD AHCI controler
To:
tech@openbsd.org
Date:
Mon, 20 Jul 2026 20:17:33 +0200

Download raw body.

Thread
Hi,

The AMD AHCI controller advertises port multiplier support but probing
for a PMP on each port costs 10 seconds of timeouts per disk at attach
time.  We should disable it, like we do it for Intel.

ok?

bye,
jan

Index: dev/pci/ahci_pci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/ahci_pci.c,v
diff -u -p -r1.18 ahci_pci.c
--- dev/pci/ahci_pci.c	16 Jun 2024 18:00:08 -0000	1.18
+++ dev/pci/ahci_pci.c	20 Jul 2026 15:00:21 -0000
@@ -67,6 +67,8 @@ int			ahci_ati_sb700_attach(struct ahci_
 			    struct pci_attach_args *);
 int			ahci_amd_hudson2_attach(struct ahci_softc *,
 			    struct pci_attach_args *);
+int			ahci_amd_kerncz_attach(struct ahci_softc *,
+			    struct pci_attach_args *);
 int			ahci_intel_attach(struct ahci_softc *,
 			    struct pci_attach_args *);
 int			ahci_samsung_attach(struct ahci_softc *,
@@ -88,6 +90,11 @@ static const struct ahci_device ahci_dev
 	{ PCI_VENDOR_AMD,	PCI_PRODUCT_AMD_HUDSON2_SATA_6,
 	    NULL,		ahci_amd_hudson2_attach },
 
+	{ PCI_VENDOR_AMD,	PCI_PRODUCT_AMD_KERNCZ_AHCI_1,
+	    NULL,		ahci_amd_kerncz_attach },
+	{ PCI_VENDOR_AMD,	PCI_PRODUCT_AMD_KERNCZ_AHCI_2,
+	    NULL,		ahci_amd_kerncz_attach },
+
 	{ PCI_VENDOR_ATI,	PCI_PRODUCT_ATI_SB600_SATA,
 	    NULL,		ahci_ati_sb600_attach },
 	{ PCI_VENDOR_ATI,	PCI_PRODUCT_ATI_SBX00_SATA_1,
@@ -263,6 +270,14 @@ ahci_amd_hudson2_attach(struct ahci_soft
 	ahci_ati_sb_idetoahci(sc, pa);
 
 	sc->sc_flags |= AHCI_F_IPMS_PROBE;
+
+	return (0);
+}
+
+int
+ahci_amd_kerncz_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
+{
+	sc->sc_flags |= AHCI_F_NO_PMP;
 
 	return (0);
 }