From 79ea464be7c74a996f1917ebed9cd3ae145987af Mon Sep 17 00:00:00 2001
From: chrfranke <chrfranke@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Sat, 26 Sep 2009 20:38:40 +0000
Subject: [PATCH] Increase SCSI_TIMEOUT_DEFAULT from 6 to 20 seconds to avoid
 timeouts when a disk spins up from standby mode.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2924 4ea69e1a-61f1-4043-bf83-b5c94c648137
---
 smartmontools/CHANGELOG  | 3 +++
 smartmontools/scsicmds.h | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG
index a9b57ee57..ce320f883 100644
--- a/smartmontools/CHANGELOG
+++ b/smartmontools/CHANGELOG
@@ -43,6 +43,9 @@ NOTES FOR FUTURE RELEASES: see TODO file.
 
 <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
 
+  [CF] Increase SCSI_TIMEOUT_DEFAULT from 6 to 20 seconds to avoid
+       timeouts when a disk spins up from standby mode.
+
   [CF] Add USB ID of AcomData 504 (OnSpec USB bridge).
 
   [AS] Correcting manual pages (FreeBSD related)
diff --git a/smartmontools/scsicmds.h b/smartmontools/scsicmds.h
index 8a7211443..3fdd45380 100644
--- a/smartmontools/scsicmds.h
+++ b/smartmontools/scsicmds.h
@@ -32,7 +32,7 @@
 #ifndef SCSICMDS_H_
 #define SCSICMDS_H_
 
-#define SCSICMDS_H_CVSID "$Id: scsicmds.h,v 1.69 2009/06/24 04:10:10 dpgilbert Exp $\n"
+#define SCSICMDS_H_CVSID "$Id$\n"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -273,7 +273,8 @@ Documentation, see http://www.storage.ibm.com/techsup/hddtech/prodspecs.htm */
 
 
 /* SCSI command timeout values (units are seconds) */
-#define SCSI_TIMEOUT_DEFAULT    6               /* 6 seconds should be ample */
+#define SCSI_TIMEOUT_DEFAULT    20  // should be longer than the spin up time
+                                    // of a disk in standby mode.
 #define SCSI_TIMEOUT_SELF_TEST  (5 * 60 * 60)   /* allow max 5 hours for */
                                             /* extended foreground self test */
 
-- 
GitLab