IBM M5100 Raid Controller stuck in Safe Mode.

So today at work I was attempting to re purpose an IBM x3650 M4  that was previously being used an an ESXi host from an internal USB drive. I’d thrown in a bunch of SAS disks from some other servers I was decomissioning, yoinked the USB key out, and was attempting to create some virtual drives. Normally this should be a trivial exercise, but the M5100 raid controller was perpetually reporting it was in Safe Mode, and wouldn’t let me successfully clear the the foreign configuration from either the GUI or the Storage interface to the controller in the BIOS. After a bit of faffing around, launching the CLI interface for the controller  and running “-adpfacdefset -a0” to reset the controller to factory defaults worked to successfully kill the safe mode loop, allow me to clear the foreign config and create new drives. There was a bit of a dearth of results googling for M5100 safe mode, so hopefully this will be of use to someone in the future.