linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 3/9] block: xd: raise timeouts
Date: Tue, 12 Feb 2013 23:40:54 +0100	[thread overview]
Message-ID: <1360708860-23466-5-git-send-email-linus.walleij@linaro.org> (raw)
In-Reply-To: <1360708860-23466-4-git-send-email-linus.walleij@linaro.org>

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


  reply	other threads:[~2013-02-12 22:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 22:40 [PATCH 0/9] revive the XD driver a bit Linus Walleij
2013-02-12 22:40 ` [PATCH 1/9] block: introduce a delay before every outb operation Linus Walleij
2013-02-12 22:40   ` [PATCH 1/9] block: xd: " Linus Walleij
2013-02-12 22:40     ` [PATCH 2/9] block: xd: fix up request handler loop Linus Walleij
2013-02-12 22:40       ` Linus Walleij [this message]
2013-02-12 22:40         ` [PATCH 4/9] block: xd: some whitespace and #if 0 removal Linus Walleij
2013-02-12 22:40           ` [PATCH 5/9] block: xd: avoid using typedefs Linus Walleij
2013-02-12 22:40             ` [PATCH 6/9] block: xd: avoid some forward declarations Linus Walleij
2013-02-12 22:40               ` [PATCH 7/9] block: xd: merge header file into driver Linus Walleij
2013-02-12 22:40                 ` [PATCH 8/9] block: xd: remove custom DEBUG print system Linus Walleij
2013-02-12 22:41                   ` [PATCH 9/9] block: xd: replace all printks with pr_* Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360708860-23466-5-git-send-email-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).