I have some questions about the sequence of calls to request/free MSIX interrupt resource.
I tried "amd64 FreeBSD 13.1" and "amd64 FreeBSD 13.2".
When requesting MSIX interrupt resource, I tried the following 2 sequences:
*Sequence A:
bus_alloc_resource
pci_msix_count
pci_alloc_msix
bus_setup_intr
*Sequence B:
pci_msix_count
pci_alloc_msix
bus_alloc_resource
bus_setup_intr
When using "Sequence A", I observed bus_alloc_resource FAIL (return NULL pointer).
When using "Sequence B", it works so I choose "Sequence B".
When freeing MSIX interrupt resource, I tried the following 2 sequences:
*Sequence C:
bus_teardown_intr
pci_release_msi
bus_release_resource
*Sequence D:
bus_teardown_intr
bus_release_resource
pci_release_msi
When using "Sequence C", I observed one system log "Device leaked MSI vectors" when unloading the device driver.
When using "Sequence D", I observed "sudo acpiconf -s 3" is no longer able to suspend system to RAM.
Which sequence is correct or is there some other good approach?
Related man:
https://man.freebsd.org/cgi/man.cgi?query=pci_release_msi&sektion=9&manpath=freebsd-release-ports
According to the man, "Sequence A" and "Sequence C" are correct.
However,
Thanks in advance.
I tried "amd64 FreeBSD 13.1" and "amd64 FreeBSD 13.2".
When requesting MSIX interrupt resource, I tried the following 2 sequences:
*Sequence A:
bus_alloc_resource
pci_msix_count
pci_alloc_msix
bus_setup_intr
*Sequence B:
pci_msix_count
pci_alloc_msix
bus_alloc_resource
bus_setup_intr
When using "Sequence A", I observed bus_alloc_resource FAIL (return NULL pointer).
When using "Sequence B", it works so I choose "Sequence B".
When freeing MSIX interrupt resource, I tried the following 2 sequences:
*Sequence C:
bus_teardown_intr
pci_release_msi
bus_release_resource
*Sequence D:
bus_teardown_intr
bus_release_resource
pci_release_msi
When using "Sequence C", I observed one system log "Device leaked MSI vectors" when unloading the device driver.
When using "Sequence D", I observed "sudo acpiconf -s 3" is no longer able to suspend system to RAM.
Which sequence is correct or is there some other good approach?
Related man:
https://man.freebsd.org/cgi/man.cgi?query=pci_release_msi&sektion=9&manpath=freebsd-release-ports
According to the man, "Sequence A" and "Sequence C" are correct.
However,
- When using "Sequence A", I observed bus_alloc_resource FAIL (return NULL pointer).
- When using "Sequence C", I observed one system log "Device leaked MSI vectors" when unloading the device driver.
Thanks in advance.
Last edited: