I had exactly this problem on Linux with an H240. I purchased from eBay: https://www.ebay.com/itm/HP-H240-SAS-3-12Gbps-HBA-Host-Bus-Adapter-779134-001-761873-B21-726907-B21-ZFS-/163127028279
The cause of this problem is probably the same as the cause of mine - overheating. The H240 has a big heatsink (clue!) and an airflow guide to capture as much of the high-volume airflow from high-RPM server fans (another clue!). If the card is put in another type of case, it overheats and shuts down to protect itself.
I solved my issue by putting a 50mm fan on top of the heatsink (carefully superglued to the plastic shroud, which clips on to the card). The eBay seller, theartofserver, was extremely helpful with after-sales support.
You can test whether this is happening to you by installing the HP smart array tools and running:
# ssacli controller slot=0 show
... and checking the controller temperature reading. When overheating mine was showing >80 C - with the additional fan it's 45 C.
Also, remember you need to have enough power to run the controller (heatsink implies power hungry) and your drives.
D.