cciss: shorten 30s timeout on controller reset
authorJens Axboe <jens.axboe@oracle.com>
Mon, 23 Feb 2009 07:53:35 +0000 (08:53 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 26 Feb 2009 09:45:48 +0000 (10:45 +0100)
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>
drivers/block/cciss.c

index d2cb67b61176674f7e8df4230f1d807db2190ee3..b5a06111463018b5d93f3d2b944caf9c60654281 100644 (file)
@@ -3611,11 +3611,15 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
                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;
                }
        }