lpfc 8.3.21: RRQ Implementation fixes
Subsystems (2)
PATCH 2/6 lpfc 8.3.21: RRQ Implementation fixes
RRQ Implementation fixes
- Added checks to prevent a call to findnode_did in clr_active_rrq
- Added the del_sync_timer call for the rrq_tmr to the stop_hba_timers routine.
- Added a check in __lpfc_set_active_rrq for the driver unloading to prevent adding an rrq when the driver is being removed.
- Add code to scsi_iocb_cmpl to check for the remote stop and add the rrq.
- Added the same check to els retry.
- Added code to compare the source did in the els rrq to the vports did and chose the right exchange ID.
- Initialize the start_cmd pointer to indicate when we have looped through all of the scsi buffers.
- Remove the need for the lock around the clearing of the active bit in the rrq.
- Added code to clean the els and fcp xri aborted list and remove the all of the RRQs for a deleted vport.
---
lpfc_crtn.h | 2 lpfc_els.c | 52 +++++++++++++-- lpfc_hbadisc.c | 6 + lpfc_init.c | 13 ++- lpfc_scsi.c | 77 ++++++++++++++++------ lpfc_sli.c | 191 ++++++++++++++++++++++++++------------------------------- lpfc_sli4.h | 2 7 files changed, 205 insertions(+), 138 deletions(-)
drivers/scsi/lpfc/lpfc_crtn.h +1 -1
@@ -423,6 +423,6 @@ int lpfc_send_rrq(struct lpfc_hba *, strint lpfc_set_rrq_active (struct lpfc_hba *,struct lpfc_nodelist *,uint16_t ,uint16_t ,uint16_t );void lpfc_cleanup_wt_rrqs (struct lpfc_hba *); -void lpfc_cleanup_vports_rrqs (struct lpfc_vport *); +void lpfc_cleanup_vports_rrqs (struct lpfc_vport *,struct lpfc_nodelist *);struct lpfc_node_rrq *lpfc_get_active_rrq (struct lpfc_vport *,uint16_t ,uint32_t );
drivers/scsi/lpfc/lpfc_els.c +46 -6
89 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_hbadisc.c +4 -2
@@ -3160,7 +3160,7 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hbaspin_unlock_irq (shost->host_lock); vport->unreg_vpi_cmpl =VPORT_OK ;mempool_free (pmb, phba->mbox_mem_pool); -lpfc_cleanup_vports_rrqs (vport); +lpfc_cleanup_vports_rrqs (vport,NULL );/* * This shost reference might have been taken at the beginning of * lpfc_vport_delete()
@@ -3900,6 +3900,8 @@ lpfc_drop_node(struct lpfc_vport *vport,if (ndlp->nlp_state ==NLP_STE_UNUSED_NODE )return ;lpfc_nlp_set_state (vport, ndlp,NLP_STE_UNUSED_NODE ); +if (vport->phba->sli_rev ==LPFC_SLI_REV4 ) +lpfc_cleanup_vports_rrqs (vport, ndlp);lpfc_nlp_put (ndlp);return ; }
@@ -4289,7 +4291,7 @@ lpfc_cleanup_node(struct lpfc_vport *vpolist_del_init (&ndlp->els_retry_evt.evt_listp);list_del_init (&ndlp->dev_loss_evt.evt_listp); - +lpfc_cleanup_vports_rrqs (vport, ndlp);lpfc_unreg_rpi (vport, ndlp);return 0 ;
drivers/scsi/lpfc/lpfc_init.c +7 -6
@@ -945,17 +945,13 @@ static void lpfc_rrq_timeout(unsigned long ptr) {struct lpfc_hba *phba; -uint32_t tmo_posted;unsigned long iflag; phba = (struct lpfc_hba *)ptr;spin_lock_irqsave (&phba->pport->work_port_lock, iflag); - tmo_posted = phba->hba_flag &HBA_RRQ_ACTIVE ; -if (!tmo_posted) - phba->hba_flag |=HBA_RRQ_ACTIVE ; + phba->hba_flag |=HBA_RRQ_ACTIVE ;spin_unlock_irqrestore (&phba->pport->work_port_lock, iflag); -if (!tmo_posted) -lpfc_worker_wake_up (phba); +lpfc_worker_wake_up (phba); }/**
@@ -2280,6 +2276,7 @@ lpfc_cleanup(struct lpfc_vport *vport)/* Wait for any activity on ndlps to settle */ msleep (10 ); } +lpfc_cleanup_vports_rrqs (vport,NULL ); }/**
@@ -2355,6 +2352,10 @@ lpfc_stop_hba_timers(struct lpfc_hba *phdel_timer_sync (&phba->fabric_block_timer);del_timer_sync (&phba->eratt_poll);del_timer_sync (&phba->hb_tmofunc); +if (phba->sli_rev ==LPFC_SLI_REV4 ) { +del_timer_sync (&phba->rrq_tmr); + phba->hba_flag &= ~HBA_RRQ_ACTIVE ; + } phba->hb_outstanding =0 ;switch (phba->pci_dev_grp) {
drivers/scsi/lpfc/lpfc_scsi.c +56 -21
117 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_sli4.h +2 -0
@@ -566,6 +566,8 @@ void lpfc_sli4_fcp_xri_aborted(struct lp struct sli4_wcqe_xri_aborted *);void lpfc_sli4_els_xri_aborted (struct lpfc_hba *,struct sli4_wcqe_xri_aborted *); +void lpfc_sli4_vport_delete_els_xri_aborted (struct lpfc_vport *); +void lpfc_sli4_vport_delete_fcp_xri_aborted (struct lpfc_vport *);int lpfc_sli4_brdreset (struct lpfc_hba *);int lpfc_sli4_add_fcf_record (struct lpfc_hba *,struct fcf_record *);void lpfc_sli_remove_dflt_fcf (struct lpfc_hba *);
drivers/scsi/lpfc/lpfc_sli.c +89 -102
312 lines not on this page · raw message