aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
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
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')
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c8
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c9
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c22
3 files changed, 25 insertions, 14 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 379397d17aca..d54ae1999797 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -3003,7 +3003,7 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
3003 * ABTS we cannot generate and RRQ. 3003 * ABTS we cannot generate and RRQ.
3004 */ 3004 */
3005 lpfc_set_rrq_active(phba, ndlp, 3005 lpfc_set_rrq_active(phba, ndlp,
3006 cmdiocb->sli4_xritag, 0, 0); 3006 cmdiocb->sli4_lxritag, 0, 0);
3007 } 3007 }
3008 break; 3008 break;
3009 case IOSTAT_LOCAL_REJECT: 3009 case IOSTAT_LOCAL_REJECT:
@@ -5673,7 +5673,7 @@ lpfc_issue_els_rrq(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
5673 pcmd += sizeof(uint32_t); 5673 pcmd += sizeof(uint32_t);
5674 els_rrq = (struct RRQ *) pcmd; 5674 els_rrq = (struct RRQ *) pcmd;
5675 5675
5676 bf_set(rrq_oxid, els_rrq, rrq->xritag); 5676 bf_set(rrq_oxid, els_rrq, phba->sli4_hba.xri_ids[rrq->xritag]);
5677 bf_set(rrq_rxid, els_rrq, rrq->rxid); 5677 bf_set(rrq_rxid, els_rrq, rrq->rxid);
5678 bf_set(rrq_did, els_rrq, vport->fc_myDID); 5678 bf_set(rrq_did, els_rrq, vport->fc_myDID);
5679 els_rrq->rrq = cpu_to_be32(els_rrq->rrq); 5679 els_rrq->rrq = cpu_to_be32(els_rrq->rrq);
@@ -7960,7 +7960,9 @@ lpfc_sli4_els_xri_aborted(struct lpfc_hba *phba,
7960 sglq_entry->state = SGL_FREED; 7960 sglq_entry->state = SGL_FREED;
7961 spin_unlock(&phba->sli4_hba.abts_sgl_list_lock); 7961 spin_unlock(&phba->sli4_hba.abts_sgl_list_lock);
7962 spin_unlock_irqrestore(&phba->hbalock, iflag); 7962 spin_unlock_irqrestore(&phba->hbalock, iflag);
7963 lpfc_set_rrq_active(phba, ndlp, xri, rxid, 1); 7963 lpfc_set_rrq_active(phba, ndlp,
7964 sglq_entry->sli4_lxritag,
7965 rxid, 1);
7964 7966
7965 /* Check if TXQ queue needs to be serviced */ 7967 /* Check if TXQ queue needs to be serviced */
7966 if (pring->txq_cnt) 7968 if (pring->txq_cnt)
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 9434b0379abe..b410555f3a83 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -696,7 +696,8 @@ lpfc_sli4_fcp_xri_aborted(struct lpfc_hba *phba,
696 rrq_empty = list_empty(&phba->active_rrq_list); 696 rrq_empty = list_empty(&phba->active_rrq_list);
697 spin_unlock_irqrestore(&phba->hbalock, iflag); 697 spin_unlock_irqrestore(&phba->hbalock, iflag);
698 if (ndlp) { 698 if (ndlp) {
699 lpfc_set_rrq_active(phba, ndlp, xri, rxid, 1); 699 lpfc_set_rrq_active(phba, ndlp,
700 psb->cur_iocbq.sli4_lxritag, rxid, 1);
700 lpfc_sli4_abts_err_handler(phba, ndlp, axri); 701 lpfc_sli4_abts_err_handler(phba, ndlp, axri);
701 } 702 }
702 lpfc_release_scsi_buf_s4(phba, psb); 703 lpfc_release_scsi_buf_s4(phba, psb);
@@ -1099,7 +1100,7 @@ lpfc_get_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
1099 list_for_each_entry(lpfc_cmd, &phba->lpfc_scsi_buf_list, 1100 list_for_each_entry(lpfc_cmd, &phba->lpfc_scsi_buf_list,
1100 list) { 1101 list) {
1101 if (lpfc_test_rrq_active(phba, ndlp, 1102 if (lpfc_test_rrq_active(phba, ndlp,
1102 lpfc_cmd->cur_iocbq.sli4_xritag)) 1103 lpfc_cmd->cur_iocbq.sli4_lxritag))
1103 continue; 1104 continue;
1104 list_del(&lpfc_cmd->list); 1105 list_del(&lpfc_cmd->list);
1105 found = 1; 1106 found = 1;
@@ -3758,8 +3759,8 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
3758 * ABTS we cannot generate and RRQ. 3759 * ABTS we cannot generate and RRQ.
3759 */ 3760 */
3760 lpfc_set_rrq_active(phba, pnode, 3761 lpfc_set_rrq_active(phba, pnode,
3761 lpfc_cmd->cur_iocbq.sli4_xritag, 3762 lpfc_cmd->cur_iocbq.sli4_lxritag,
3762 0, 0); 3763 0, 0);
3763 } 3764 }
3764 /* else: fall through */ 3765 /* else: fall through */
3765 default: 3766 default:
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);