Skip to contentSkip to conversation

cciss kexec reset_devices commit

DISCUSSION Randy Dunlap 2 participants 2 messages Feb 27, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

Was commit 5e4c91c84b194b26cf592779e451f4b5be777cba supposed to remove the unconditional 30-second delay and replace it with a timeout loop?

What I see now (in source code) is the 30-second delay followed by 30 1-second retries...???

schedule_timeout_uninterruptible(30*HZ);

/* Now try to get the controller to respond to a no-op */
- for (i=0; i<12; i++) {
+ for (i=0; i<30; i++) {
if (cciss_noop(pdev) == 0)
break;
- else
- printk("cciss: no-op failed%s\n", (i < 11 ? "; re-trying" : ""));
+
+ schedule_timeout_uninterruptible(HZ);
+ }
+ if (i == 30) {
+ printk(KERN_ERR "cciss: controller seems dead\n");
+ return -EBUSY;
}
}

Signature · 1 line
~Randy
#1 lore raw
Quoted 14 lines · Randy Dunlap

Was commit 5e4c91c84b194b26cf592779e451f4b5be777cba supposed to remove the unconditional 30-second delay and replace it with a timeout loop?

What I see now (in source code) is the 30-second delay followed by 30 1-second retries...???

(quoted diff) +1 -1
 		schedule_timeout_uninterruptible(30*HZ);
 
 		/* Now try to get the controller to respond to a no-op */
-		for (i=0; i<12; i++) {
+		for (i=0; i<30; i++) {
 			if (cciss_noop(pdev) == 0)
 				break;

Review

Quoted 10 lines
(quoted diff) +6 -2
-			else
-				printk("cciss: no-op failed%s\n", (i < 11 ? "; re-trying" : ""));
+
+			schedule_timeout_uninterruptible(HZ);
+		}
+		if (i == 30) {
+			printk(KERN_ERR "cciss: controller seems dead\n");
+			return -EBUSY;
 		}
 	}

Good catch Randy, that first sleep should have gone away of course. I'll kill it.

Signature · 1 line
Jens Axboe