lpfc: Fix premature release of rpi bit in bitmask
Subsystems (2)
PATCH 14/21 lpfc: Fix premature release of rpi bit in bitmask
Fix premature release of rpi bit in bitmask
Currently, the driver plays off the fact that older sli4 adapters have a different rpi access pattern that allowed for the rpi reference to be released earlier in the teardown sequence, allowing the driver to recycle the rpi value sooner. Newer sli4 adapters have a different access pattern that requires us to wait for a later mailbox completion. This changes the put call location on the newer sli4 adapters.
Symptoms of the error are "0110 ELS" and the "0372 iotag" errors.
--- drivers/scsi/lpfc/lpfc_crtn.h | 1 + drivers/scsi/lpfc/lpfc_els.c | 5 ++++ drivers/scsi/lpfc/lpfc_hbadisc.c | 60 +++++++++++++++++++++++++++++++++++----- drivers/scsi/lpfc/lpfc_init.c | 24 ++++++++++++++-- drivers/scsi/lpfc/lpfc_sli.c | 49 ++++++++++++++++++++++++++++++-- 5 files changed, 127 insertions(+), 12 deletions(-)
drivers/scsi/lpfc/lpfc_crtn.h +1 -0
@@ -284,6 +284,7 @@ void lpfc_sli_handle_slow_ring_event(struct lpfc_hba *, struct lpfc_sli_ring *, uint32_t);void lpfc_sli4_handle_received_buffer (struct lpfc_hba *,struct hbq_dmabuf *);void lpfc_sli_def_mbox_cmpl (struct lpfc_hba *,LPFC_MBOXQ_t *); +void lpfc_sli4_unreg_rpi_cmpl_clr (struct lpfc_hba *,LPFC_MBOXQ_t *);int lpfc_sli_issue_iocb (struct lpfc_hba *,uint32_t ,struct lpfc_iocbq *,uint32_t );void lpfc_sli_pcimem_bcopy (void *,void *,uint32_t );
drivers/scsi/lpfc/lpfc_els.c +5 -0
@@ -3700,6 +3700,11 @@ lpfc_mbx_cmpl_dflt_rpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)kfree (mp);mempool_free (pmb, phba->mbox_mem_pool);if (ndlp) { +lpfc_printf_vlog (ndlp->vport,KERN_INFO ,LOG_NODE , +"0006 rpi%x DID:%x flg:%x %d map:%x %p\n" , + ndlp->nlp_rpi, ndlp->nlp_DID, ndlp->nlp_flag, +atomic_read (&ndlp->kref.refcount), + ndlp->nlp_usg_map, ndlp);if (NLP_CHK_NODE_ACT (ndlp)) {lpfc_nlp_put (ndlp);/* This is the end of the default RPI cleanup logic for
drivers/scsi/lpfc/lpfc_hbadisc.c +53 -7
117 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_init.c +22 -2
@@ -2775,9 +2775,19 @@ lpfc_sli4_node_prep(struct lpfc_hba *phba)list_for_each_entry_safe (ndlp, next_ndlp, &vports[i]->fc_nodes, nlp_listp) { -if (NLP_CHK_NODE_ACT (ndlp)) +if (NLP_CHK_NODE_ACT (ndlp)) { ndlp->nlp_rpi =lpfc_sli4_alloc_rpi (phba); +lpfc_printf_vlog (ndlp->vport,KERN_INFO , +LOG_NODE , +"0009 rpi:%x DID:%x " +"flg:%x map:%x %p\n" , + ndlp->nlp_rpi, + ndlp->nlp_DID, + ndlp->nlp_flag, + ndlp->nlp_usg_map, + ndlp); + } } } }
@@ -2941,8 +2951,18 @@ lpfc_offline_prep(struct lpfc_hba *phba, int mbx_action)* RPI. Get a new RPI when the adapter port * comes back online. */ -if (phba->sli_rev ==LPFC_SLI_REV4 ) +if (phba->sli_rev ==LPFC_SLI_REV4 ) { +lpfc_printf_vlog (ndlp->vport, +KERN_INFO ,LOG_NODE , +"0011 lpfc_offline: " +"ndlp:x%p did %x " +"usgmap:x%x rpi:%x\n" , + ndlp, ndlp->nlp_DID, + ndlp->nlp_usg_map, + ndlp->nlp_rpi); +lpfc_sli4_free_rpi (phba, ndlp->nlp_rpi); + }lpfc_unreg_rpi (vports[i], ndlp); } }
drivers/scsi/lpfc/lpfc_sli.c +46 -3
72 lines not on this page · raw message
Signature · 1 line
1.7.11.7
Quoted 9 lines · James Smart
Fix premature release of rpi bit in bitmask
Currently, the driver plays off the fact that older sli4 adapters have a different rpi access pattern that allowed for the rpi reference to be released earlier in the teardown sequence, allowing the driver to recycle the rpi value sooner. Newer sli4 adapters have a different access pattern that requires us to wait for a later mailbox completion. This changes the put call location on the newer sli4 adapters.
Quoted 5 lines
Symptoms of the error are "0110 ELS" and the "0372 iotag" errors.
Signed-off-by Dick Kennedy <[email protected]>Signed-off-by James Smart <[email protected]>---
Cheers,
Hannes
Signature · 8 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html