diff options
author | James Smart <jsmart2021@gmail.com> | 2017-03-04 12:30:28 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-03-06 23:04:22 -0500 |
commit | a5068b46958870633ea340692f301507ef78d00b (patch) | |
tree | 3c441c93581d207601e49b067f5faf66feb51e86 | |
parent | b06a622ffe8dddcc09dad23dc768f7d1540fb4d6 (diff) |
scsi: lpfc: Fix IO submission if WQ is full
For both initiator and target: if WQ is full, return -EBUSY.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nvme.c | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nvmet.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index bf3ccc5d59ac..e1bf31eca845 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c | |||
@@ -1310,7 +1310,7 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port *pnvme_lport, | |||
1310 | "sid: x%x did: x%x oxid: x%x\n", | 1310 | "sid: x%x did: x%x oxid: x%x\n", |
1311 | ret, vport->fc_myDID, ndlp->nlp_DID, | 1311 | ret, vport->fc_myDID, ndlp->nlp_DID, |
1312 | lpfc_ncmd->cur_iocbq.sli4_xritag); | 1312 | lpfc_ncmd->cur_iocbq.sli4_xritag); |
1313 | ret = -EINVAL; | 1313 | ret = -EBUSY; |
1314 | goto out_free_nvme_buf; | 1314 | goto out_free_nvme_buf; |
1315 | } | 1315 | } |
1316 | 1316 | ||
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index 6c2221aac394..735e2ba70198 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c | |||
@@ -571,6 +571,7 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport, | |||
571 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 571 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, |
572 | "6102 Bad state IO x%x aborted\n", | 572 | "6102 Bad state IO x%x aborted\n", |
573 | ctxp->oxid); | 573 | ctxp->oxid); |
574 | rc = -ENXIO; | ||
574 | goto aerr; | 575 | goto aerr; |
575 | } | 576 | } |
576 | 577 | ||
@@ -580,6 +581,7 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport, | |||
580 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 581 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, |
581 | "6152 FCP Drop IO x%x: Prep\n", | 582 | "6152 FCP Drop IO x%x: Prep\n", |
582 | ctxp->oxid); | 583 | ctxp->oxid); |
584 | rc = -ENXIO; | ||
583 | goto aerr; | 585 | goto aerr; |
584 | } | 586 | } |
585 | 587 | ||
@@ -618,8 +620,9 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport, | |||
618 | ctxp->wqeq->hba_wqidx = 0; | 620 | ctxp->wqeq->hba_wqidx = 0; |
619 | nvmewqeq->context2 = NULL; | 621 | nvmewqeq->context2 = NULL; |
620 | nvmewqeq->context3 = NULL; | 622 | nvmewqeq->context3 = NULL; |
623 | rc = -EBUSY; | ||
621 | aerr: | 624 | aerr: |
622 | return -ENXIO; | 625 | return rc; |
623 | } | 626 | } |
624 | 627 | ||
625 | static void | 628 | static void |