diff options
author | Quinn Tran <quinn.tran@cavium.com> | 2019-01-25 08:23:42 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-02-06 03:41:16 +0100 |
commit | 80676d054e5a945f8192802b68093764fbf3c5fc (patch) | |
tree | 8f6f6ecf6843897589e24aa2b3d68d267f5907f6 /drivers/scsi/qla2xxx/qla_iocb.c | |
parent | scsi: qla2xxx: Change default ZIO threshold. (diff) | |
download | linux-80676d054e5a945f8192802b68093764fbf3c5fc.tar.xz linux-80676d054e5a945f8192802b68093764fbf3c5fc.zip |
scsi: qla2xxx: Fix session cleanup hang
On session cleanup, either an implicit LOGO or an implicit PRLO is used to
flush IOs. If the flush command hit Queue Full condition, then it is
dropped. This patch adds retry code to prevent command drop.
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_iocb.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 65ba0e36ee60..2c27ae1924c5 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -3645,23 +3645,22 @@ qla24xx_prlo_iocb(srb_t *sp, struct logio_entry_24xx *logio) int qla2x00_start_sp(srb_t *sp) { - int rval; + int rval = QLA_SUCCESS; scsi_qla_host_t *vha = sp->vha; struct qla_hw_data *ha = vha->hw; struct qla_qpair *qp = sp->qpair; void *pkt; unsigned long flags; - rval = QLA_FUNCTION_FAILED; spin_lock_irqsave(qp->qp_lock_ptr, flags); pkt = __qla2x00_alloc_iocbs(sp->qpair, sp); if (!pkt) { + rval = EAGAIN; ql_log(ql_log_warn, vha, 0x700c, "qla2x00_alloc_iocbs failed.\n"); goto done; } - rval = QLA_SUCCESS; switch (sp->type) { case SRB_LOGIN_CMD: IS_FWI2_CAPABLE(ha) ? |