[SCSI] qla4xxx: wait for device_ready before device discovery
authorKaren Higgins <karen.higgins@qlogic.com>
Sat, 10 Jul 2010 09:21:17 +0000 (14:51 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 28 Jul 2010 14:05:24 +0000 (09:05 -0500)
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla4xxx/ql4_init.c

index 5fc19c44bada59cc102f94923f9a044779f45ce8..e6b73b9fcc5a5a2859c51d47cca24d45e418c17e 100644 (file)
@@ -991,6 +991,9 @@ static int qla4xxx_initialize_ddb_list(struct scsi_qla_host *ha)
 
        qla4xxx_flush_AENS(ha);
 
+       /* Wait for an AEN */
+       qla4xxx_devices_ready(ha);
+
        /*
         * First perform device discovery for active
         * fw ddb indexes and build
@@ -999,9 +1002,6 @@ static int qla4xxx_initialize_ddb_list(struct scsi_qla_host *ha)
        if ((status = qla4xxx_build_ddb_list(ha)) == QLA_ERROR)
                return status;
 
-       /* Wait for an AEN */
-       qla4xxx_devices_ready(ha);
-
        /*
         * Targets can come online after the inital discovery, so processing
         * the aens here will catch them.