]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/cciss.c
Merge branch 'topic/sscape-fix' into for-linus
[linux-2.6-omap-h63xx.git] / drivers / block / cciss.c
index d2cb67b61176674f7e8df4230f1d807db2190ee3..4f9b6d7920173d19f85dc0cb822c3e33d87b1db9 100644 (file)
@@ -3606,16 +3606,18 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
                if (cciss_hard_reset_controller(pdev) || cciss_reset_msi(pdev))
                        return -ENODEV;
 
-               /* Some devices (notably the HP Smart Array 5i Controller)
-                  need a little pause here */
-               schedule_timeout_uninterruptible(30*HZ);
-
-               /* Now try to get the controller to respond to a no-op */
-               for (i=0; i<12; i++) {
+               /* Now try to get the controller to respond to a no-op. Some
+                  devices (notably the HP Smart Array 5i Controller) need
+                  up to 30 seconds to respond. */
+               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;
                }
        }