spi: hisi-sfc-v3xx: add error check after per operation
authorYicong Yang <yangyicong@hisilicon.com>
Fri, 17 Apr 2020 07:48:27 +0000 (15:48 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 17 Apr 2020 13:21:00 +0000 (14:21 +0100)
commit59fc9ad5cb108bce18043281c7cf67f2b425d55d
treeddc92aa11b0c9a4ecaccb662b53fbb00fcd6993d
parent9d282c17b023a97516a63255ce7f7ee65c39bec1
spi: hisi-sfc-v3xx: add error check after per operation

The controller may receive instructions of accessing protected address,
or may perform failed page program. These operations will not succeed
and the controller will receive interrupts when such failure occur.
Previously we don't check the interrupts and return 0 even if such
operation fails.

Check the interrupts after per command and inform the user
if there is an error.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Acked-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1587109707-23597-1-git-send-email-yangyicong@hisilicon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-hisi-sfc-v3xx.c