From: Ravi Anand Date: Wed, 17 May 2006 22:08:44 +0000 (-0700) Subject: [SCSI] qla2xxx: Don't wait for loop transition to complete if LOOP_DEAD state is... X-Git-Tag: v2.6.18-rc1~1092^2~55 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=57680080baf3a8e289fad7f9e3c43ed58309e1eb;p=karo-tx-linux.git [SCSI] qla2xxx: Don't wait for loop transition to complete if LOOP_DEAD state is attained. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 017729c59a49..fbf3b03aba6b 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -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;