aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2012-05-09 21:19:14 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-05-17 06:10:25 -0400
commitee0f4fe17b0fda87c7f4eb3ec6e96ef8291419bd (patch)
tree946eb55e8aa32e7682b4672d73500b9b1a4b3109 /drivers/scsi/lpfc/lpfc_sli.c
parent939723a4a680a7863fc95179b1480c5529f31d88 (diff)
[SCSI] lpfc 8.3.31: Fix unsol abts xri lookup
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index e84dd32553bc..70e4bc3a1a2d 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -885,7 +885,7 @@ __lpfc_sli_get_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq)
885 while (!found) { 885 while (!found) {
886 if (!sglq) 886 if (!sglq)
887 return NULL; 887 return NULL;
888 if (lpfc_test_rrq_active(phba, ndlp, sglq->sli4_xritag)) { 888 if (lpfc_test_rrq_active(phba, ndlp, sglq->sli4_lxritag)) {
889 /* This xri has an rrq outstanding for this DID. 889 /* This xri has an rrq outstanding for this DID.
890 * put it back in the list and get another xri. 890 * put it back in the list and get another xri.
891 */ 891 */
@@ -13953,7 +13953,6 @@ lpfc_sli4_xri_inrange(struct lpfc_hba *phba,
13953 return NO_XRI; 13953 return NO_XRI;
13954} 13954}
13955 13955
13956
13957/** 13956/**
13958 * lpfc_sli4_seq_abort_rsp - bls rsp to sequence abort 13957 * lpfc_sli4_seq_abort_rsp - bls rsp to sequence abort
13959 * @phba: Pointer to HBA context object. 13958 * @phba: Pointer to HBA context object.
@@ -13968,7 +13967,7 @@ lpfc_sli4_seq_abort_rsp(struct lpfc_hba *phba,
13968{ 13967{
13969 struct lpfc_iocbq *ctiocb = NULL; 13968 struct lpfc_iocbq *ctiocb = NULL;
13970 struct lpfc_nodelist *ndlp; 13969 struct lpfc_nodelist *ndlp;
13971 uint16_t oxid, rxid; 13970 uint16_t oxid, rxid, xri, lxri;
13972 uint32_t sid, fctl; 13971 uint32_t sid, fctl;
13973 IOCB_t *icmd; 13972 IOCB_t *icmd;
13974 int rc; 13973 int rc;
@@ -13987,8 +13986,6 @@ lpfc_sli4_seq_abort_rsp(struct lpfc_hba *phba,
13987 "SID:x%x\n", oxid, sid); 13986 "SID:x%x\n", oxid, sid);
13988 return; 13987 return;
13989 } 13988 }
13990 if (lpfc_sli4_xri_inrange(phba, rxid))
13991 lpfc_set_rrq_active(phba, ndlp, rxid, oxid, 0);
13992 13989
13993 /* Allocate buffer for rsp iocb */ 13990 /* Allocate buffer for rsp iocb */
13994 ctiocb = lpfc_sli_get_iocbq(phba); 13991 ctiocb = lpfc_sli_get_iocbq(phba);
@@ -14019,13 +14016,24 @@ lpfc_sli4_seq_abort_rsp(struct lpfc_hba *phba,
14019 ctiocb->sli4_lxritag = NO_XRI; 14016 ctiocb->sli4_lxritag = NO_XRI;
14020 ctiocb->sli4_xritag = NO_XRI; 14017 ctiocb->sli4_xritag = NO_XRI;
14021 14018
14019 if (fctl & FC_FC_EX_CTX)
14020 /* Exchange responder sent the abort so we
14021 * own the oxid.
14022 */
14023 xri = oxid;
14024 else
14025 xri = rxid;
14026 lxri = lpfc_sli4_xri_inrange(phba, xri);
14027 if (lxri != NO_XRI)
14028 lpfc_set_rrq_active(phba, ndlp, lxri,
14029 (xri == oxid) ? rxid : oxid, 0);
14022 /* If the oxid maps to the FCP XRI range or if it is out of range, 14030 /* If the oxid maps to the FCP XRI range or if it is out of range,
14023 * send a BLS_RJT. The driver no longer has that exchange. 14031 * send a BLS_RJT. The driver no longer has that exchange.
14024 * Override the IOCB for a BA_RJT. 14032 * Override the IOCB for a BA_RJT.
14025 */ 14033 */
14026 if (oxid > (phba->sli4_hba.max_cfg_param.max_xri + 14034 if (xri > (phba->sli4_hba.max_cfg_param.max_xri +
14027 phba->sli4_hba.max_cfg_param.xri_base) || 14035 phba->sli4_hba.max_cfg_param.xri_base) ||
14028 oxid > (lpfc_sli4_get_els_iocb_cnt(phba) + 14036 xri > (lpfc_sli4_get_els_iocb_cnt(phba) +
14029 phba->sli4_hba.max_cfg_param.xri_base)) { 14037 phba->sli4_hba.max_cfg_param.xri_base)) {
14030 icmd->un.xseq64.w5.hcsw.Rctl = FC_RCTL_BA_RJT; 14038 icmd->un.xseq64.w5.hcsw.Rctl = FC_RCTL_BA_RJT;
14031 bf_set(lpfc_vndr_code, &icmd->un.bls_rsp, 0); 14039 bf_set(lpfc_vndr_code, &icmd->un.bls_rsp, 0);