SCSI disk spinuptime timeout.

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Wed, 14 Apr 1999 17:31:06 +0200 (MEST)


Hi,

I wanted to change the scsi disk spinuptime timeout. (I currently have
a disk that refuses to spinup, unless you tell it to do so repeatedly).

I had expected to have to change a #defined constant somewhere, but
it turns out that the constant 100 was embedded into the code.

Anyway, I went "all the way" and made it a configuration option.

Does anybody have objections to this?

Roger.

diff -ur linux-2.2.5.clean/Documentation/Configure.help linux/Documentation/Configure.help
--- linux-2.2.5.clean/Documentation/Configure.help Wed Apr 7 17:04:21 1999
+++ linux/Documentation/Configure.help Wed Apr 14 17:18:30 1999
@@ -3508,6 +3508,15 @@
on a SCSI disk. In this case, do not compile the driver for your
SCSI host adapter (below) as a module either.

+SCSI disk spinup time
+CONFIG_SCSI_SD_SPINUPTIME
+ Some SCSI disks can be jumpered not to start until the computer
+ tells it to. This sets the time that the kernel will wait before
+ giving up on a drive. Usually a drive will report "ready" well
+ before this, but if you have a misbehaving disk, you can alter the
+ timeout here. It is best to leave this at 100 unless you know what
+ you are doing.
+
SCSI tape support
CONFIG_CHR_DEV_ST
If you want to use a SCSI tape drive under Linux, say Y and read the
diff -ur linux-2.2.5.clean/drivers/scsi/Config.in linux/drivers/scsi/Config.in
--- linux-2.2.5.clean/drivers/scsi/Config.in Wed Apr 7 16:56:02 1999
+++ linux/drivers/scsi/Config.in Wed Apr 14 17:05:31 1999
@@ -1,6 +1,9 @@
comment 'SCSI support type (disk, tape, CD-ROM)'

dep_tristate 'SCSI disk support' CONFIG_BLK_DEV_SD $CONFIG_SCSI
+if [ "$CONFIG_BLK_DEV_SD" != "n" ]; then
+ int 'SCSI disk spinup time' CONFIG_SCSI_SD_SPINUPTIME 100
+fi
dep_tristate 'SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
dep_tristate 'SCSI CD-ROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
diff -ur linux-2.2.5.clean/drivers/scsi/sd.c linux/drivers/scsi/sd.c
--- linux-2.2.5.clean/drivers/scsi/sd.c Wed Apr 7 16:55:42 1999
+++ linux/drivers/scsi/sd.c Wed Apr 14 17:01:10 1999
@@ -1231,7 +1231,8 @@
printk( "." );
spin_lock_irq(&io_request_lock);
}
- } while(the_result && spintime && spintime+100*HZ > jiffies);
+ } while(the_result && spintime &&
+ spintime+CONFIG_SCSI_SD_SPINUPTIME*HZ > jiffies);
if (spintime) {
if (the_result)
printk( "not responding...\n" );

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------

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