Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cciss: shorten 30s timeout on controller reset

If reset_devices is set for kexec, then cciss will delay 30 seconds
since the old 5i controller _may_ need that long to recover. Replace
the long sleep with incremental sleep and tests to reduce the 30 seconds
to worst case for 5i, so that other controllers will proceed quickly.

Reviewed-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

+7 -3
+7 -3
drivers/block/cciss.c
··· 3611 3611 schedule_timeout_uninterruptible(30*HZ); 3612 3612 3613 3613 /* Now try to get the controller to respond to a no-op */ 3614 - for (i=0; i<12; i++) { 3614 + for (i=0; i<30; i++) { 3615 3615 if (cciss_noop(pdev) == 0) 3616 3616 break; 3617 - else 3618 - printk("cciss: no-op failed%s\n", (i < 11 ? "; re-trying" : "")); 3617 + 3618 + schedule_timeout_uninterruptible(HZ); 3619 + } 3620 + if (i == 30) { 3621 + printk(KERN_ERR "cciss: controller seems dead\n"); 3622 + return -EBUSY; 3619 3623 } 3620 3624 } 3621 3625