aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_els.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-02-26 14:14:23 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-03-03 08:39:18 -0500
commit0f65ff680f90281d49ee864965f06774eba9657d (patch)
treec12332bc872aaf2616b94b38cfb5d76a510b1272 /drivers/scsi/lpfc/lpfc_els.c
parente40a02c12581f710877da372b5d7e15b68a1c5c3 (diff)
[SCSI] lpfc 8.3.10: Update SLI interface areas
- Clear LPFC_DRIVER_ABORTED on FCP command completion. - Clear exchange busy flag when I/O is aborted and found on aborted list. - Free sglq when XRI_ABORTED event is processed before release of IOCB. - Only process iocb as aborted when LPFC_DRIVER_ABORTED is set. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 4623323da577..6a2135a0d03a 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -6234,7 +6234,8 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
6234 lpfc_mbx_unreg_vpi(vport); 6234 lpfc_mbx_unreg_vpi(vport);
6235 spin_lock_irq(shost->host_lock); 6235 spin_lock_irq(shost->host_lock);
6236 vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI; 6236 vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
6237 vport->fc_flag |= FC_VPORT_NEEDS_INIT_VPI; 6237 if (phba->sli_rev == LPFC_SLI_REV4)
6238 vport->fc_flag |= FC_VPORT_NEEDS_INIT_VPI;
6238 spin_unlock_irq(shost->host_lock); 6239 spin_unlock_irq(shost->host_lock);
6239 } 6240 }
6240 6241
@@ -6812,21 +6813,27 @@ lpfc_sli4_els_xri_aborted(struct lpfc_hba *phba,
6812 struct lpfc_sglq *sglq_entry = NULL, *sglq_next = NULL; 6813 struct lpfc_sglq *sglq_entry = NULL, *sglq_next = NULL;
6813 unsigned long iflag = 0; 6814 unsigned long iflag = 0;
6814 6815
6815 spin_lock_irqsave(&phba->sli4_hba.abts_sgl_list_lock, iflag); 6816 spin_lock_irqsave(&phba->hbalock, iflag);
6817 spin_lock(&phba->sli4_hba.abts_sgl_list_lock);
6816 list_for_each_entry_safe(sglq_entry, sglq_next, 6818 list_for_each_entry_safe(sglq_entry, sglq_next,
6817 &phba->sli4_hba.lpfc_abts_els_sgl_list, list) { 6819 &phba->sli4_hba.lpfc_abts_els_sgl_list, list) {
6818 if (sglq_entry->sli4_xritag == xri) { 6820 if (sglq_entry->sli4_xritag == xri) {
6819 list_del(&sglq_entry->list); 6821 list_del(&sglq_entry->list);
6820 spin_unlock_irqrestore(
6821 &phba->sli4_hba.abts_sgl_list_lock,
6822 iflag);
6823 spin_lock_irqsave(&phba->hbalock, iflag);
6824
6825 list_add_tail(&sglq_entry->list, 6822 list_add_tail(&sglq_entry->list,
6826 &phba->sli4_hba.lpfc_sgl_list); 6823 &phba->sli4_hba.lpfc_sgl_list);
6824 sglq_entry->state = SGL_FREED;
6825 spin_unlock(&phba->sli4_hba.abts_sgl_list_lock);
6827 spin_unlock_irqrestore(&phba->hbalock, iflag); 6826 spin_unlock_irqrestore(&phba->hbalock, iflag);
6828 return; 6827 return;
6829 } 6828 }
6830 } 6829 }
6831 spin_unlock_irqrestore(&phba->sli4_hba.abts_sgl_list_lock, iflag); 6830 spin_unlock(&phba->sli4_hba.abts_sgl_list_lock);
6831 sglq_entry = __lpfc_get_active_sglq(phba, xri);
6832 if (!sglq_entry || (sglq_entry->sli4_xritag != xri)) {
6833 spin_unlock_irqrestore(&phba->hbalock, iflag);
6834 return;
6835 }
6836 sglq_entry->state = SGL_XRI_ABORTED;
6837 spin_unlock_irqrestore(&phba->hbalock, iflag);
6838 return;
6832} 6839}