Patch "spi: double time out tolerance" has been added to the 4.11-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
spi: double time out tolerance
to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
spi-double-time-out-tolerance.patch
and it can be found in the queue-4.11 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
833bfade96561216aa2129516a5926a0326860a2Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <[email protected]>
Date: Mon, 17 Apr 2017 01:38:05 +0200
Subject: spi: double time out tolerance
From: Hauke Mehrtens <[email protected]>
commit 833bfade96561216aa2129516a5926a0326860a2 upstream.
The generic SPI code calculates how long the issued transfer would take and adds 100ms in addition to the timeout as tolerance. On my 500 MHz Lantiq Mips SoC I am getting timeouts from the SPI like this when the system boots up:
m25p80 spi32766.4: SPI transfer timed outblk_update_request: I/O error, dev mtdblock3, sector 2 SQUASHFS error: squashfs_read_data failed to read block 0x6e
After increasing the tolerance for the timeout to 200ms I haven't seen these SPI transfer time outs any more.
The Lantiq SPI driver in use here has an extra work queue in between, which gets triggered when the controller send the last word and the hardware FIFOs used for reading and writing are only 8 words long.
--- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi.c +1 -1
@@ -1015,7 +1015,7 @@ static int spi_transfer_one_message(stru ret =0 ; ms =8LL *1000LL * xfer->len;do_div (ms, xfer->speed_hz); - ms += ms +100 ;/* some tolerance */ + ms += ms +200 ;/* some tolerance */ if (ms >UINT_MAX ) ms =UINT_MAX ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.11/spi-double-time-out-tolerance.patch