NOTE: not real HBA mode. It is pseudo-HBA on top of RAID:
SSD DISCARD not working: `its firmware and the hpsa driver do not translate SCSI UNMAP commands into SATA DATA SET MANAGEMENT (TRIM) commands—or they fail to expose the VPD (Vital Product Data) discard parameters to the OS.`
Switch to an LSI IT-Mode HBA (Recommended): the cleanest permanent fix is replacing the P822 with an LSI SAS2308 or SAS3008 based card (such as an HPE H220, Dell H310, or LSI 9207-8i/8e) flashed to IT mode. These use the mpt3sas driver and handle SATA TRIM translation reliably.