Skip to contentSkip to conversation

Patch from my store of obscure fixes

PATCH Pete Zaitcev 2 participants 2 messages Aug 9, 2002 – Aug 13, 2002 SCSI

lore
Share & tools
lore
#0 lore raw

Apparently, this patch comes from an expirience with a Clariion array with some volumes disabled by operator. When Linux reboots, it tries to spin them up and for some reason it times out, and generally takes a very long time. I do suspect that START STOP UNIT should return failure immediately, but perhaps it does not. What do you guys think about this? Obviously a workaround, but is it useful?

-- Pete

drivers/scsi/sd.c +10 -0
@@ -847,6 +847,16 @@
 		}
 
 		/*
+		 * If the drive requires human intervention,
+		 * don't bother to jerk the drive until it happens.
+		 */
+		if (the_result != 0 &&
+		    SRpnt->sr_sense_buffer[2] == NOT_READY &&
+		    SRpnt->sr_sense_buffer[12] == 0x04 &&	/* ASC */
+		    SRpnt->sr_sense_buffer[13] == 0x03)		/* ASCQ */
+			return;
+
+		/*
 		 * If the drive has indicated to us that it doesn't have
 		 * any media in it, don't bother with any of the rest of
 		 * this crap.
#1 lore raw
Quoted 7 lines · Pete Zaitcev

Apparently, this patch comes from an expirience with a Clariion array with some volumes disabled by operator. When Linux reboots, it tries to spin them up and for some reason it times out, and generally takes a very long time. I do suspect that START STOP UNIT should return failure immediately, but perhaps it does not. What do you guys think about this? Obviously a workaround, but is it useful?

It looks good, except the device should be offlined (or ?), and the read capacity prevented; the similiar 2.4 patch prevented the read capacity since the code is different, and it returned before the read capacity.

-- Patrick Mansfield

Quoted 22 lines

-- Pete

drivers/scsi/sd.c +10 -0
@@ -847,6 +847,16 @@
 		}
 
 		/*
+		 * If the drive requires human intervention,
+		 * don't bother to jerk the drive until it happens.
+		 */
+		if (the_result != 0 &&
+		    SRpnt->sr_sense_buffer[2] == NOT_READY &&
+		    SRpnt->sr_sense_buffer[12] == 0x04 &&	/* ASC */
+		    SRpnt->sr_sense_buffer[13] == 0x03)		/* ASCQ */
+			return;
+
+		/*
 		 * If the drive has indicated to us that it doesn't have
 		 * any media in it, don't bother with any of the rest of
 		 * this crap.