projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3126fd
)
spi: spi-s3c64xx: Do not ignore timeout errors in polling I/O mode
author
Sylwester Nawrocki
<s.nawrocki@samsung.com>
Thu, 12 Apr 2018 13:57:17 +0000
(15:57 +0200)
committer
Junghoon Kim
<jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:56:58 +0000
(14:56 +0900)
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.
Change-Id: I39d663204880bb5a9c4d092c020912055078416c
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/spi/spi-s3c64xx.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-s3c64xx.c
b/drivers/spi/spi-s3c64xx.c
index
b8c4a92
..
57ce730
100644
(file)
--- a/
drivers/spi/spi-s3c64xx.c
+++ b/
drivers/spi/spi-s3c64xx.c
@@
-512,6
+512,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) {