lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Feb 2013 23:40:54 +0100
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Jens Axboe <axboe@...nel.dk>
Cc:	linux-kernel@...r.kernel.org,
	Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH 3/9] block: xd: raise timeouts

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@...aro.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ