Re: ahci(4): Disable PMP for AMD AHCI controler

Jan Klemkow <[email protected]> Fri, 24 Jul 2026 11:09:16 +0200
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
On Thu, Jul 23, 2026 at 08:52:21PM -0700, Mike Larkin wrote:
> On Thu, Jul 23, 2026 at 08:50:09PM -0700, Mike Larkin wrote:
> > On Tue, Jul 21, 2026 at 02:32:46PM +0200, Jan Klemkow wrote:
> > > On Tue, Jul 21, 2026 at 05:02:04AM -0700, Mike Larkin wrote:
> > > > On Tue, Jul 21, 2026 at 09:39:22AM +0200, Jan Klemkow wrote:
> > > > > On Tue, Jul 21, 2026 at 09:55:50AM +1000, Jonathan Matthew wrote:
> > > > > > On Mon, Jul 20, 2026 at 08:17:33PM +0200, Jan Klemkow wrote:
> > > > > > > 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.
> > > > > >
> > > > > > What systems does this controller appear in?
> > > > >
> > > > > ASRock Rack TURIND8-2L2T mainboard with an AMD EPYC 9115 processor.
> > > > > I'm not sure in which component contains the SATA controller.
> > > > >
> > > > > > Do you know if port multipliers actually work with it?
> > > > >
> > > > > No, I don't have hardware to test the SATA port multiplier function.
> > > > > Do you know what I would need to test it?
> > > > >
> > > >
> > > > I think I have one of these on my EPYC 7773X ASUS machine. Please hold off
> > > > until I have a chance to test cos that's got all my storage attached to it :)
> > >
> > > Could you also check on your machine, if it hangs for 10s for every port
> > > at this attach stage?
> > >
> > > ahci2 at pci15 dev 0 function 0 "AMD FCH AHCI" rev 0x93: msi, AHCI 1.3.1
> > > ahci2: port 0: 6.0Gb/s
> > > ahci2: port 1: 6.0Gb/s
> > > ahci2: port 2: 6.0Gb/s
> > > ahci2: port 3: 6.0Gb/s
> >
> > With this diff none of my ahci* attach.
> >
> > Without the diff, it does take 10s between attaches, but at least it works.
> 
> I guess technically I should say:
> 
> "no sd* on ahci* attaches"
> 
> The ahci does attach but it just immediately skips every sd(4) as if nothing is
> present.

Thanks for testing Mike!

I thought the PMP feature were outdated and obsolete.  So, the right
solution is to fix the PMP attachment algorithm.

Which hardware do you use in this setup?  Which Mainboard and how are
your disks being connected to you mainboard?  Do you have a special
backplane for the disks in you case?  Or do you use a special sata
controller?  Can you send me a dmesg of you storage system?

Thanks,
Jan