Messages in this thread Patch in this message | | | From | Linus Walleij <> | Subject | [PATCH 3/9] block: xd: raise timeouts | Date | Tue, 12 Feb 2013 23:40:54 +0100 |
| |
The timeouts for the XD driver were set pretty low, probably tested out on an error-free disk. When there are bad sectors on the disk, the controller card will autonomously perform a bump of the drive head, a quite slow mechanical operation which takes way more than one second, or even the 8 seconds allowed for the IRQ to arrive. Raise both timeouts to 30 seconds.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- drivers/block/xd.c | 2 +- drivers/block/xd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/xd.c b/drivers/block/xd.c index ce088f8..549a7fa 100644 --- a/drivers/block/xd.c +++ b/drivers/block/xd.c @@ -564,7 +564,7 @@ static inline u_char xd_waitport (u_short port,u_char flags,u_char mask,u_long t static inline u_int xd_wait_for_IRQ (void) { unsigned long flags; - xd_watchdog_int.expires = jiffies + 8 * HZ; + xd_watchdog_int.expires = jiffies + 30 * HZ; add_timer(&xd_watchdog_int); flags=claim_dma_lock(); diff --git a/drivers/block/xd.h b/drivers/block/xd.h index 37cacef..489e1ce 100644 --- a/drivers/block/xd.h +++ b/drivers/block/xd.h @@ -67,7 +67,7 @@ #define DMA_MODE 0x03 /* control bits to set for DMA & interrupt */ #define XD_MAXDRIVES 2 /* maximum 2 drives */ -#define XD_TIMEOUT HZ /* 1 second timeout */ +#define XD_TIMEOUT (HZ * 30) /* 30 second timeout */ #define XD_RETRIES 4 /* maximum 4 retries */ #undef DEBUG /* define for debugging output */ -- 1.8.1.2
| |