]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9886e4bf73c1147e904d9fe468ede16a65cf8fcf
treeddc92aa11b0c9a4ecaccb662b53fbb00fcd6993d
parent0130ca90f48c8a3a33c50866336fcabd211a5022
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