Skip to contentSkip to conversation

scsi SEND DIAGNOSTIC timeout 2.4.21-pre6

PATCH New Douglas Gilbert 1 participant 1 message Apr 4, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi SEND DIAGNOSTIC timeout 2.4.21-pre6

Marcelo,
While working with smartmontools I found that an extended foreground self-test failed because the SCSI command that sends it: SEND DIAGNOSTIC, has a normal timeout value of 10 seconds. With my 18 GB disk this test takes 12 minutes. Larger disks can take up to an hour.

This patch makes the SCSI_IOCTL_SEND_COMMAND ioctl's timeout for SEND DIAGNOSTIC the same as it is for FORMAT (2 hours).

The scsi_ioctl.c file is the same in lk 2.4.20 and lk 2.4.21-pre6 .

Doug Gilbert

drivers/scsi/scsi_ioctl.c2420sd renamed from drivers/scsi/scsi_ioctl.c +1 -0
@@ -282,6 +282,7 @@
 		cmd[1] = (cmd[1] & 0x1f) | (dev->lun << 5);
 
 	switch (opcode) {
+	case SEND_DIAGNOSTIC:
 	case FORMAT_UNIT:
 		timeout = FORMAT_UNIT_TIMEOUT;
 		retries = 1;