diff options
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 3 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 9480c55963ea..c0117dd4b9cc 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -4886,6 +4886,9 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
4886 | goto out_unlock; | 4886 | goto out_unlock; |
4887 | } | 4887 | } |
4888 | 4888 | ||
4889 | /* Indicate the IO is being aborted by the driver. */ | ||
4890 | iocb->iocb_flag |= LPFC_DRIVER_ABORTED; | ||
4891 | |||
4889 | /* | 4892 | /* |
4890 | * The scsi command can not be in txq and it is in flight because the | 4893 | * The scsi command can not be in txq and it is in flight because the |
4891 | * pCmd is still pointig at the SCSI command we have to abort. There | 4894 | * pCmd is still pointig at the SCSI command we have to abort. There |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 56d4055022a9..612f48973ff2 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -9831,6 +9831,13 @@ lpfc_sli_abort_iocb(struct lpfc_vport *vport, struct lpfc_sli_ring *pring, | |||
9831 | abort_cmd) != 0) | 9831 | abort_cmd) != 0) |
9832 | continue; | 9832 | continue; |
9833 | 9833 | ||
9834 | /* | ||
9835 | * If the iocbq is already being aborted, don't take a second | ||
9836 | * action, but do count it. | ||
9837 | */ | ||
9838 | if (iocbq->iocb_flag & LPFC_DRIVER_ABORTED) | ||
9839 | continue; | ||
9840 | |||
9834 | /* issue ABTS for this IOCB based on iotag */ | 9841 | /* issue ABTS for this IOCB based on iotag */ |
9835 | abtsiocb = lpfc_sli_get_iocbq(phba); | 9842 | abtsiocb = lpfc_sli_get_iocbq(phba); |
9836 | if (abtsiocb == NULL) { | 9843 | if (abtsiocb == NULL) { |
@@ -9838,6 +9845,9 @@ lpfc_sli_abort_iocb(struct lpfc_vport *vport, struct lpfc_sli_ring *pring, | |||
9838 | continue; | 9845 | continue; |
9839 | } | 9846 | } |
9840 | 9847 | ||
9848 | /* indicate the IO is being aborted by the driver. */ | ||
9849 | iocbq->iocb_flag |= LPFC_DRIVER_ABORTED; | ||
9850 | |||
9841 | cmd = &iocbq->iocb; | 9851 | cmd = &iocbq->iocb; |
9842 | abtsiocb->iocb.un.acxri.abortType = ABORT_TYPE_ABTS; | 9852 | abtsiocb->iocb.un.acxri.abortType = ABORT_TYPE_ABTS; |
9843 | abtsiocb->iocb.un.acxri.abortContextTag = cmd->ulpContext; | 9853 | abtsiocb->iocb.un.acxri.abortContextTag = cmd->ulpContext; |
@@ -9847,7 +9857,7 @@ lpfc_sli_abort_iocb(struct lpfc_vport *vport, struct lpfc_sli_ring *pring, | |||
9847 | abtsiocb->iocb.un.acxri.abortIoTag = cmd->ulpIoTag; | 9857 | abtsiocb->iocb.un.acxri.abortIoTag = cmd->ulpIoTag; |
9848 | abtsiocb->iocb.ulpLe = 1; | 9858 | abtsiocb->iocb.ulpLe = 1; |
9849 | abtsiocb->iocb.ulpClass = cmd->ulpClass; | 9859 | abtsiocb->iocb.ulpClass = cmd->ulpClass; |
9850 | abtsiocb->vport = phba->pport; | 9860 | abtsiocb->vport = vport; |
9851 | 9861 | ||
9852 | /* ABTS WQE must go to the same WQ as the WQE to be aborted */ | 9862 | /* ABTS WQE must go to the same WQ as the WQE to be aborted */ |
9853 | abtsiocb->fcp_wqidx = iocbq->fcp_wqidx; | 9863 | abtsiocb->fcp_wqidx = iocbq->fcp_wqidx; |