From 3eedf81cdbcd29f71b11d1d003ecd9a69597e1e3 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 27 May 2019 22:13:35 +0000 Subject: [PATCH] qla2x00t: Always check the return value of qla2x00_eh_wait_for_pending_commands() git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8385 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t/qla_init.c | 3 ++- qla2x00t/qla_nx.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qla2x00t/qla_init.c b/qla2x00t/qla_init.c index 1c75897d4..7dd610a50 100644 --- a/qla2x00t/qla_init.c +++ b/qla2x00t/qla_init.c @@ -3969,7 +3969,8 @@ qla82xx_quiescent_state_cleanup(scsi_qla_host_t *vha) LOOP_DOWN_TIME); } /* Wait for pending cmds to complete */ - qla2x00_eh_wait_for_pending_commands(vha, 0, 0, WAIT_HOST); + WARN_ON_ONCE(qla2x00_eh_wait_for_pending_commands(vha, 0, 0, WAIT_HOST) + != QLA_SUCCESS); } void diff --git a/qla2x00t/qla_nx.c b/qla2x00t/qla_nx.c index 5b5a0fb27..d6a00fc25 100644 --- a/qla2x00t/qla_nx.c +++ b/qla2x00t/qla_nx.c @@ -3642,11 +3642,13 @@ qla82xx_chip_reset_cleanup(scsi_qla_host_t *vha) spin_unlock_irqrestore(&ha->hardware_lock, flags); /* Wait for pending cmds (physical and virtual) to complete */ - if (!qla2x00_eh_wait_for_pending_commands(vha, 0, 0, + if (qla2x00_eh_wait_for_pending_commands(vha, 0, 0, WAIT_HOST) == QLA_SUCCESS) { ql_dbg(ql_dbg_init, vha, 0x00b3, "Done wait for " "pending commands.\n"); + } else { + WARN_ON_ONCE(true); } } }