aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c7
-rw-r--r--drivers/scsi/lpfc/lpfc_nportdisc.c6
-rw-r--r--drivers/scsi/lpfc/lpfc_nvme.c23
3 files changed, 32 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index a66c4fbc7690..729d343861f4 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -297,6 +297,13 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr,
297 len = snprintf(buf, PAGE_SIZE, "NVME Initiator Enabled\n"); 297 len = snprintf(buf, PAGE_SIZE, "NVME Initiator Enabled\n");
298 298
299 spin_lock_irq(shost->host_lock); 299 spin_lock_irq(shost->host_lock);
300 len += snprintf(buf + len, PAGE_SIZE - len,
301 "XRI Dist lpfc%d Total %d NVME %d SCSI %d ELS %d\n",
302 phba->brd_no,
303 phba->sli4_hba.max_cfg_param.max_xri,
304 phba->sli4_hba.nvme_xri_max,
305 phba->sli4_hba.scsi_xri_max,
306 lpfc_sli4_get_els_iocb_cnt(phba));
300 307
301 /* Port state is only one of two values for now. */ 308 /* Port state is only one of two values for now. */
302 if (localport->port_id) 309 if (localport->port_id)
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index e790c0bc64fc..1a803975bcbc 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -1982,6 +1982,12 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
1982 if (bf_get_be32(prli_disc, nvpr)) 1982 if (bf_get_be32(prli_disc, nvpr))
1983 ndlp->nlp_type |= NLP_NVME_DISCOVERY; 1983 ndlp->nlp_type |= NLP_NVME_DISCOVERY;
1984 1984
1985 /* This node is an NVME target. Adjust the command
1986 * queue depth on this node to not exceed the available
1987 * xris.
1988 */
1989 ndlp->cmd_qdepth = phba->sli4_hba.nvme_xri_max;
1990
1985 /* 1991 /*
1986 * If prli_fba is set, the Target supports FirstBurst. 1992 * If prli_fba is set, the Target supports FirstBurst.
1987 * If prli_fb_sz is 0, the FirstBurst size is unlimited, 1993 * If prli_fb_sz is 0, the FirstBurst size is unlimited,
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index f5f90d19b215..288dd3caff8a 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -973,9 +973,22 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
973 973
974 /* Sanity check on return of outstanding command */ 974 /* Sanity check on return of outstanding command */
975 if (!lpfc_ncmd || !lpfc_ncmd->nvmeCmd || !lpfc_ncmd->nrport) { 975 if (!lpfc_ncmd || !lpfc_ncmd->nvmeCmd || !lpfc_ncmd->nrport) {
976 if (!lpfc_ncmd) {
977 lpfc_printf_vlog(vport, KERN_ERR,
978 LOG_NODE | LOG_NVME_IOERR,
979 "6071 Null lpfc_ncmd pointer. No "
980 "release, skip completion\n");
981 return;
982 }
983
976 lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE | LOG_NVME_IOERR, 984 lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE | LOG_NVME_IOERR,
977 "6071 Completion pointers bad on wqe %p.\n", 985 "6066 Missing cmpl ptrs: lpfc_ncmd %p, "
978 wcqe); 986 "nvmeCmd %p nrport %p\n",
987 lpfc_ncmd, lpfc_ncmd->nvmeCmd,
988 lpfc_ncmd->nrport);
989
990 /* Release the lpfc_ncmd regardless of the missing elements. */
991 lpfc_release_nvme_buf(phba, lpfc_ncmd);
979 return; 992 return;
980 } 993 }
981 nCmd = lpfc_ncmd->nvmeCmd; 994 nCmd = lpfc_ncmd->nvmeCmd;
@@ -1537,8 +1550,10 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port *pnvme_lport,
1537 !expedite) { 1550 !expedite) {
1538 lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_IOERR, 1551 lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_IOERR,
1539 "6174 Fail IO, ndlp qdepth exceeded: " 1552 "6174 Fail IO, ndlp qdepth exceeded: "
1540 "idx %d DID %x\n", 1553 "idx %d DID %x pend %d qdepth %d\n",
1541 lpfc_queue_info->index, ndlp->nlp_DID); 1554 lpfc_queue_info->index, ndlp->nlp_DID,
1555 atomic_read(&ndlp->cmd_pending),
1556 ndlp->cmd_qdepth);
1542 atomic_inc(&lport->xmt_fcp_qdepth); 1557 atomic_inc(&lport->xmt_fcp_qdepth);
1543 ret = -EBUSY; 1558 ret = -EBUSY;
1544 goto out_fail; 1559 goto out_fail;