The AT26DF081A requires the Write Enable Latch (WLE) to be set for write/erase operations. Also bit 5 is the Erase/Program Error (EPE) bit, so has nothing to do with the block protection. Ignore it when testing for block protections.
Signed-off-and-tested-by: Mathias Krause mathias.krause@secunet.com