Use a distinct return code for SPI commands with unsupported/invalid length

Some drivers support only a few combinations of read/write length and
return error otherwise. Having a distinct return code for this error
means we can handle it in upper layers.

Corresponding to flashrom svn r653.

Signed-off-by: Carl-Daniel Hailfinger <>
Acked-by: Stefan Reinauer <>
6 files changed