[SCSI] lpfc 8.3.42: Fix driver's abort loop functionality to skip IOs already getting aborted

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>

authored by James Smart and committed by James Bottomley afbd8d88 092cb034

+14 -1
+3
drivers/scsi/lpfc/lpfc_scsi.c
··· 4886 goto out_unlock; 4887 } 4888 4889 /* 4890 * 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
··· 4886 goto out_unlock; 4887 } 4888 4889 + /* Indicate the IO is being aborted by the driver. */ 4890 + iocb->iocb_flag |= LPFC_DRIVER_ABORTED; 4891 + 4892 /* 4893 * The scsi command can not be in txq and it is in flight because the 4894 * pCmd is still pointig at the SCSI command we have to abort. There
+11 -1
drivers/scsi/lpfc/lpfc_sli.c
··· 9831 abort_cmd) != 0) 9832 continue; 9833 9834 /* issue ABTS for this IOCB based on iotag */ 9835 abtsiocb = lpfc_sli_get_iocbq(phba); 9836 if (abtsiocb == NULL) { 9837 errcnt++; 9838 continue; 9839 } 9840 9841 cmd = &iocbq->iocb; 9842 abtsiocb->iocb.un.acxri.abortType = ABORT_TYPE_ABTS; ··· 9857 abtsiocb->iocb.un.acxri.abortIoTag = cmd->ulpIoTag; 9858 abtsiocb->iocb.ulpLe = 1; 9859 abtsiocb->iocb.ulpClass = cmd->ulpClass; 9860 - abtsiocb->vport = phba->pport; 9861 9862 /* ABTS WQE must go to the same WQ as the WQE to be aborted */ 9863 abtsiocb->fcp_wqidx = iocbq->fcp_wqidx;
··· 9831 abort_cmd) != 0) 9832 continue; 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 + 9841 /* issue ABTS for this IOCB based on iotag */ 9842 abtsiocb = lpfc_sli_get_iocbq(phba); 9843 if (abtsiocb == NULL) { 9844 errcnt++; 9845 continue; 9846 } 9847 + 9848 + /* indicate the IO is being aborted by the driver. */ 9849 + iocbq->iocb_flag |= LPFC_DRIVER_ABORTED; 9850 9851 cmd = &iocbq->iocb; 9852 abtsiocb->iocb.un.acxri.abortType = ABORT_TYPE_ABTS; ··· 9847 abtsiocb->iocb.un.acxri.abortIoTag = cmd->ulpIoTag; 9848 abtsiocb->iocb.ulpLe = 1; 9849 abtsiocb->iocb.ulpClass = cmd->ulpClass; 9850 + abtsiocb->vport = vport; 9851 9852 /* ABTS WQE must go to the same WQ as the WQE to be aborted */ 9853 abtsiocb->fcp_wqidx = iocbq->fcp_wqidx;