I have read at least twenty articles dating from the time Edward Snowden's startling revelations about rogue nations and bad actors embedding malicious rootkits and spyware in the firmware of hard disk drives and solid state drives. What they did not mention is how to remove them.
There are some articles on the internet that mention the use of ATA Secure Erase/Enhanced Secure Erase feature in Linux's hdparm for the job.
I would appreciate it if you could point out if my understanding of the following issues is correct:
Disabling Host Protected Area (HPA) and resetting Device Configuration Overlay (DCO) to factory defaults will remove any existing malware/spyware embedded in the firmware of an HDD/SSD
HDD/SSD will not be bricked (that is, rendered unusable) if HPA is disabled and DCO is reset