I bought a new Broadcom MegaRAID 9580-8i8e card that is connected through both external SFF-8644 ports to a single disk shelf with SATA HDDs/SSDs disks connected to it. The OS is Windows Server 2022, latest MegaRAID driver installed.
When I power on the system the card is not detected/visible in BIOS and in Windows the MegaRAID device in Device Manager can't start because of error code 10
An I/O adapter hardware error has occurred
I noticed that when I disconnected the MegaRAID controller from the disk shelf and reboot the system, the MegaRAID controller device whould be detected in BIOS and would show no problems in Windows Device Manager. Then I connected the MegaRAID controller to the disk shelf with SFF-8644 cables and the controller reported the following error in LSA (LSI Storage Authority):
Despite getting the error above, the MegaRAID was working correctly without problems.
To summarize it worked only when the disk shelf was disconnected from the MegaRAID controller when booting and connected after system has booted - it would just show the error above that I ignored.
It turned out that the problem was that DirectPDMapping was enabled on the MegaRAID controller. I think that what happened was when the MegaRAID controller was initializing itself when the BIOS was booting it couldn't set Direct PD Mapping for my disk shelf because it has a backplane expander that is incompatible with this setting enabled. And that's why when the computer was started with the MegaRAID controller disconnected from my disk shelf, the device in Device Manager would show no problems and when it was started with the disk shelf connected it would not start, because the MegaRAID controller would not boot itself in BIOS.
So if you have one of these following errors:
check if you have Direct PD Mapping enabled
storcli /cx show directpdmapping
and if it is enabled try to disable it and rebootstorcli /cx set directpdmapping=off