mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
spi: spi-s3c64xx: Do not ignore timeout errors in polling I/O mode
Currently timeout errors in polling I/O mode transfer are silently ignored. Fix it by returning an error when we time out waiting on the RX FIFO level to reach the transfer length. Signed-off-by: Sylwester Nawrocki <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
1c75862d8e
commit
4e0b82ee31
1 changed files with 2 additions and 0 deletions
|
|
@ -503,6 +503,8 @@ static int wait_for_pio(struct s3c64xx_spi_driver_data *sdd,
|
|||
status = readl(regs + S3C64XX_SPI_STATUS);
|
||||
} while (RX_FIFO_LVL(status, sdd) < xfer->len && --val);
|
||||
|
||||
if (!val)
|
||||
return -EIO;
|
||||
|
||||
/* If it was only Tx */
|
||||
if (!xfer->rx_buf) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue