Skip to content

Commit 5768008

Browse files
Ravi AnandJames Bottomley
authored andcommitted
[SCSI] qla2xxx: Don't wait for loop transition to complete if LOOP_DEAD state is attained.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1 parent e0ecae8 commit 5768008

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,10 @@ qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha)
577577
while ((!atomic_read(&ha->loop_down_timer) &&
578578
atomic_read(&ha->loop_state) == LOOP_DOWN) ||
579579
atomic_read(&ha->loop_state) != LOOP_READY) {
580+
if (atomic_read(&ha->loop_state) == LOOP_DEAD) {
581+
return_status = QLA_FUNCTION_FAILED;
582+
break;
583+
}
580584
msleep(1000);
581585
if (time_after_eq(jiffies, loop_timeout)) {
582586
return_status = QLA_FUNCTION_FAILED;

0 commit comments

Comments
 (0)