spi: core: Increase timeout value
authorHarini Katakam <harinik@xilinx.com>
Fri, 11 Apr 2014 06:36:28 +0000 (12:06 +0530)
committerMark Brown <broonie@linaro.org>
Mon, 14 Apr 2014 16:07:02 +0000 (17:07 +0100)
commiteee668a92bc775030178c8a7f0d0abe9cce441d7
tree78c9c5f3d03b35d716f2051236534ab0ee92c1f2
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5
spi: core: Increase timeout value

The existing timeout value in wait_for_completion_timeout is
calculated from the transfer length and speed with tolerance of 10msec.
This is too low because this is used for error conditions such as
hardware hang etc.
The xfer->speed_hz considered may not be the actual speed set
because the best clock divisor is chosen from a limited set such that
the actual speed <= requested speed. This will lead to timeout being
less than actual transfer time.
Considering acceptable latencies, this timeout can be set to a
value double the expected transfer plus 100 msecs.
This patch adds the same in the core.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi.c