Ensure HPA works (again) for ACS3 drives
Brought to you by:
ideguy
Hi.
hdparm 9.49 introduced support for ACS-3 drives. Unfortunately, it decided that ACS-3 was synonymous with AMAX (i.e., ACCESSIBLE MAX ADDRESS CONFIG 78h). Unfortunately, AMAX is optional. Its presence is given by a bit in the IDENTIFY data.
This patch tests for the presence of AMAX. If not available, it falls back on the old HPA method. This is a valid fix: even though HPA is obsolete in ACS3, an ACS3 drive almost certainly supports ACS2 :)
Allows -N
to work again on my Toshiba HK4 SSD.
Patch reformatted for more recent hdparm code (labelled "9.52+") :)