Created attachment 219929 [details] Release allocated resources after chip initialisation failure. Booting 12.2 RELEASE on a Supermicro X11SPA motherboard gives this sequence of events in demsg. atapci0: <Intel ATA controller> port 0x3050-0x3057,0x3040-0x3043,0x3030-0x3037,0x3020-0x3023,0x3010-0x301f at device 22.2 numa-domain 0 on pci0 atapci0: unable to map interrupt device_attach: atapci0 attach returned 6 pci0:0:22:2: Device leaked I/O resources Looking at the code, resources are allocated using bus_alloc_resource_any(), but not released in the interrupt mapping failure case. Patch attached.
A commit references this bug: Author: markj Date: Tue Nov 24 17:13:09 UTC 2020 New revision: 367989 URL: https://svnweb.freebsd.org/changeset/base/367989 Log: ata(4): Release the ioport resource if device initialization fails PR: 251346 Submitted by: janm@transactionware.com MFC after: 1 week Changes: head/sys/dev/ata/ata-pci.c
A commit references this bug: Author: markj Date: Tue Dec 1 15:01:11 UTC 2020 New revision: 368230 URL: https://svnweb.freebsd.org/changeset/base/368230 Log: MFC r367989: ata(4): Release the ioport resource if device initialization fails PR: 251346 Changes: _U stable/12/ stable/12/sys/dev/ata/ata-pci.c
Thanks for the patch.