Message ID | 1498464091-26753-7-git-send-email-amit.pundir@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | Stable commits picked up from lede project | expand |
On Mon, Jun 26, 2017 at 01:31:30PM +0530, Amit Pundir wrote: > 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. This is pretty much just for that driver, like the commit message says it's weirdly written due to poorly thought through hardware so has noticably higher overhead than normal drivers. It shouldn't do any harm in stable since people probably shouldn't be running into errors.
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 838783c3fed0..24d4492d0168 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1004,7 +1004,7 @@ static int spi_transfer_one_message(struct spi_master *master, 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;