I have uploaded a second version of this patch that should recognize all 32-bit ARM versions, rather than just having special cases for armv6 and armv7.
Fix ARCH on ARMv6
I attached a patch with the changes I made, in case someone else wants to try to fix this.
It turns out that this did not actually fix the problem. The command succeeded but the value did not change after power cycling the drive.
I ran into this error with my My Book, which has a WD40EZRZ-22GXCB0 connected over a USB-SATA adapter. I was able to fix this by pulling in the latest version of sgio.c/h from hdparm, which has better support for this drive. There were a few minor changes required and I had to pull in a few other files from hdparm to get it compile. I'm not sure if this would fix OP's problem, but it worked for me.
Python bindings broken because config.py not installed