mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08: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 <s.nawrocki@samsung.com> Reviewed-by: Andi Shyti <andi@etezian.org> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1c75862d8e
commit
4e0b82ee31
@ -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 New Issue
Block a user