diff options
author | Duane Grigsby <duane.grigsby@cavium.com> | 2017-08-24 00:04:58 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-08-25 04:29:19 +0200 |
commit | cf19c45dba19757e5016cb1acc5ef1529005f8c3 (patch) | |
tree | bdafceae9d3b31387ed70a9469dcd493bd920e45 /drivers/scsi/qla2xxx/qla_nvme.c | |
parent | scsi: qla2xxx: Update fw_started flags at qpair creation. (diff) | |
download | linux-cf19c45dba19757e5016cb1acc5ef1529005f8c3.tar.xz linux-cf19c45dba19757e5016cb1acc5ef1529005f8c3.zip |
scsi: qla2xxx: Add command completion for error path
The driver held spinlocks during callbacks for NVME errors which
resulted in a deadlock because recovery LS cmds needed the same lock.
Signed-off-by: Duane Grigsby <duane.grigsby@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_nvme.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nvme.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 97a7b222b549..5692ae128655 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -154,6 +154,16 @@ static void qla_nvme_sp_ls_done(void *ptr, int res) qla2x00_rel_sp(sp); } +void qla_nvme_cmpl_io(struct srb_iocb *nvme) +{ + srb_t *sp; + struct nvmefc_fcp_req *fd = nvme->u.nvme.desc; + + sp = container_of(nvme, srb_t, u.iocb_cmd); + fd->done(fd); + qla2xxx_rel_qpair_sp(sp->qpair, sp); +} + static void qla_nvme_sp_done(void *ptr, int res) { srb_t *sp = ptr; @@ -175,7 +185,8 @@ static void qla_nvme_sp_done(void *ptr, int res) fd->status = 0; fd->rcv_rsplen = nvme->u.nvme.rsp_pyld_len; - fd->done(fd); + list_add_tail(&nvme->u.nvme.entry, &sp->qpair->nvme_done_list); + return; rel: qla2xxx_rel_qpair_sp(sp->qpair, sp); } |