]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] qla4xxx: Wait for disable_acb before doing set_acb
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>
Fri, 2 Dec 2011 06:42:10 +0000 (22:42 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 15 Dec 2011 06:57:42 +0000 (10:57 +0400)
In function qla4xxx_iface_set_param wait for disable_acb to
complete so that set_acb will not fail.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla4xxx/ql4_os.c

index 064d67282f59dbf954b12d60267573b667739af1..0c9ee9378094e0fd1682d9baf20465346049a54b 100644 (file)
@@ -935,7 +935,16 @@ qla4xxx_iface_set_param(struct Scsi_Host *shost, void *data, uint32_t len)
                goto exit_init_fw_cb;
        }
 
-       qla4xxx_disable_acb(ha);
+       rval = qla4xxx_disable_acb(ha);
+       if (rval != QLA_SUCCESS) {
+               ql4_printk(KERN_ERR, ha, "%s: disable acb mbx failed\n",
+                          __func__);
+               rval = -EIO;
+               goto exit_init_fw_cb;
+       }
+
+       wait_for_completion_timeout(&ha->disable_acb_comp,
+                                   DISABLE_ACB_TOV * HZ);
 
        qla4xxx_initcb_to_acb(init_fw_cb);