Problem phenomenon:
We have developed a third-party NVMe I/O kit driver for
HighPoint NVMe Controller, which runs normally on
macOS 11.x and previous version.
But the command timeout will often appear when
testing on macOS 12.0.1 system.
Problem analysis:
The Create Device Interrupt (MSI) function failed to
return, and causing the command to time out.
The following is part of the code, NULL Pointer is
returned:
ies = IOInterruptEventSource::interruptEventSource
(this, &RSNVMeController::interruptOccurred,
PCIProvider,index );
Question:
We would like to consult why Create Device Interrupt (MSI) failed and how to fix the issue???
Note:
We suspect that the Inbox NVMe driver may create a device interrupt for the third-party NVMe device when the system is started,
but sometimes it may not be released interrupt in time due to some reasons on macOS 12.0.1,
causing other third-party NVMe drivers to fail to create an interrupt for the NVMe device.
We tracked the difference between 11.6(OK) and 12.0.1(NG) regarding NVMe driver loading:
macOS11.6:
IONVMeFamily driver will Attach&Probe&Start for all NVMe devices(including Apple NVMe device and Third-Party NVMe device).
macOS12.0.1:
IONVMeFamily driver will Attach&Probe&Start for all NVMe devices(including Apple NVMe device and Third-Party NVMe device).
If a third-party NVMe driver is found, IONVMeFamily driver will terminate and Detach from Third-Party NVMe device;
IONVMeFamily driver will Attach&Probe&Detach for third-Party NVMe device.
HighPoint Third-Party NVMe driver will Attach&Probe&Detach for Third-Party NVMe device.Select HighPoint Third-Party NVMe driver to Start, because its probe score is larger than IONVMeFamily driver.
At present, it is suspected that the IONVMeFamily driver may attach/detach the third-party NVMe device multiple times in macOS 12.0.1,
which will cause some interrupt resources to not be released in some cases.
Of course this is just a guess…
STEPS TO REPRODUCE
Insert 4 NVMe devices to HighPoint SSD7505 NVMe controller
Plug SSD7505 to MacPro 2019
Enter into macOS 12.0.1
Install HighPoint NVMe driver
Reboot OS
Copy data to NVMe device
0
0
522