[SCSI] qla2xxx: Don't wait for loop transition to complete if LOOP_DEAD state is...
authorRavi Anand <ravi.anand@qlogic.com>
Wed, 17 May 2006 22:08:44 +0000 (15:08 -0700)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 20 May 2006 14:40:21 +0000 (09:40 -0500)
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/qla2xxx/qla_os.c

index 017729c59a49957d93b150fe80a85319a9fb5cff..fbf3b03aba6b310f2d9e9532e74f110f194aacb2 100644 (file)
@@ -577,6 +577,10 @@ qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha)
        while ((!atomic_read(&ha->loop_down_timer) &&
            atomic_read(&ha->loop_state) == LOOP_DOWN) ||
            atomic_read(&ha->loop_state) != LOOP_READY) {
+               if (atomic_read(&ha->loop_state) == LOOP_DEAD) {
+                       return_status = QLA_FUNCTION_FAILED;
+                       break;
+               }
                msleep(1000);
                if (time_after_eq(jiffies, loop_timeout)) {
                        return_status = QLA_FUNCTION_FAILED;