]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
spi/spi_s3c64xx: Increase dead reckoning time in wait_for_xfer()
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 7 Sep 2010 15:37:52 +0000 (16:37 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 8 Sep 2010 16:00:15 +0000 (10:00 -0600)
For small transfers at high speeds the expected transfer time can easily
be well under 1ms, causing the delay in wait_for_xfer() to be only the
dead reckoning fudge factor of 5ms currently included. Experiments on
some of my systems shows that this is marginal for some transfers so
double it to 10ms.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi_s3c64xx.c

index a4c480551e5f827e37fc5e4f4bcff2084147149c..8130f02dc466f57e65fa5b97d39fb69242cb8d1a 100644 (file)
@@ -320,7 +320,7 @@ static int wait_for_xfer(struct s3c64xx_spi_driver_data *sdd,
 
        /* millisecs to xfer 'len' bytes @ 'cur_speed' */
        ms = xfer->len * 8 * 1000 / sdd->cur_speed;
-       ms += 5; /* some tolerance */
+       ms += 10; /* some tolerance */
 
        if (dma_mode) {
                val = msecs_to_jiffies(ms) + 10;