lpfc 8.2.2 : Error messages and debugfs updates
Subsystems (2)
PATCH 1/8 lpfc 8.2.2 : Error messages and debugfs updates
Error messages and debugfs updates:
- Fix up GID_FT error messages
- Enhance debugfs with slow_ring_trace, dumpslim and nodelist information
- Add log type (and messages) for vport state changes
- Enhance log messages when retries ELS fail
Signed-off-by James Smart <[email protected]>
drivers/scsi/lpfc/lpfc_crtn.h +2 -0
@@ -271,6 +271,8 @@ extern void lpfc_debugfs_initialize(struextern void lpfc_debugfs_terminate (struct lpfc_vport *);extern void lpfc_debugfs_disc_trc (struct lpfc_vport *,int ,char *,uint32_t ,uint32_t ,uint32_t ); +extern void lpfc_debugfs_slow_ring_trc (struct lpfc_hba *,char *,uint32_t , +uint32_t ,uint32_t );/* Interface exported by fabric iocb scheduler */ int lpfc_issue_fabric_iocb (struct lpfc_hba *,struct lpfc_iocbq *);
drivers/scsi/lpfc/lpfc_ct.c +23 -3
@@ -607,7 +607,25 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba }else if (CTrsp->CommandResponse.bits.CmdRsp ==be16_to_cpu (SLI_CT_RESPONSE_FS_RJT )) {/* NameServer Rsp Error */ - lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, +if ((CTrsp->ReasonCode ==SLI_CT_UNABLE_TO_PERFORM_REQ ) + && (CTrsp->Explanation ==SLI_CT_NO_FC4_TYPES )) { +lpfc_printf_log (phba,KERN_INFO ,LOG_DISCOVERY , +"%d (%d):0269 No NameServer Entries " +"Data: x%x x%x x%x x%x\n" , + phba->brd_no, vport->vpi, + CTrsp->CommandResponse.bits.CmdRsp, + (uint32_t ) CTrsp->ReasonCode, + (uint32_t ) CTrsp->Explanation, + vport->fc_flag); + +lpfc_debugfs_disc_trc (vport,LPFC_DISC_TRC_CT , +"GID_FT no entry cmd:x%x rsn:x%x exp:x%x" , + (uint32_t )CTrsp->CommandResponse.bits.CmdRsp, + (uint32_t ) CTrsp->ReasonCode, + (uint32_t ) CTrsp->Explanation); + } +else { + lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, "%d (%d):0240 NameServer Rsp Error " "Data: x%x x%x x%x x%x\n", phba->brd_no, vport->vpi,
@@ -616,11 +634,13 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba (uint32_t ) CTrsp->Explanation, vport->fc_flag); -lpfc_debugfs_disc_trc (vport,LPFC_DISC_TRC_CT , +lpfc_debugfs_disc_trc (vport,LPFC_DISC_TRC_CT ,"GID_FT rsp err1 cmd:x%x rsn:x%x exp:x%x" , (uint32_t )CTrsp->CommandResponse.bits.CmdRsp, (uint32_t ) CTrsp->ReasonCode, (uint32_t ) CTrsp->Explanation); + } + }else {/* NameServer Rsp Error */
@@ -696,7 +716,7 @@ lpfc_cmpl_ct_cmd_gff_id(struct lpfc_hbaif ((fbits &FC4_FEATURE_INIT ) && !(fbits &FC4_FEATURE_TARGET )) { lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, - "%d (%d):0245 Skip x%x GFF " + "%d (%d):0270 Skip x%x GFF " "NameServer Rsp Data: (init) " "x%x x%x\n", phba->brd_no, vport->vpi, did, fbits,
drivers/scsi/lpfc/lpfc_debugfs.c +398 -45
600 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_debugfs.h +1 -1
@@ -22,7 +22,7 @@#define _H_LPFC_DEBUG_FS #ifdef CONFIG_LPFC_DEBUG_FS -struct lpfc_disc_trc { +struct lpfc_debugfs_trc { char *fmt; uint32_t data1; uint32_t data2;
drivers/scsi/lpfc/lpfc_els.c +5 -6
@@ -2033,12 +2033,11 @@ lpfc_els_retry(struct lpfc_hba *phba, st }/* No retry ELS command <elsCmd> to remote NPORT <did> */ -lpfc_printf_log (phba,KERN_INFO ,LOG_ELS , -"%d (%d):0108 No retry ELS command x%x to remote " -"NPORT x%x Data: x%x\n" , - phba->brd_no, vport->vpi, - cmd, did, cmdiocb->retry); - +lpfc_printf_vlog (vport,KERN_ERR ,LOG_ELS , +"0108 No retry ELS command x%x to remote " +"NPORT x%x Retried:%d Error:x%x/%x\n" , + cmd, did, cmdiocb->retry, irsp->ulpStatus, + irsp->un.ulpWord[4 ]);return 0 ; }
drivers/scsi/lpfc/lpfc.h +5 -1
@@ -335,7 +335,7 @@ struct lpfc_vport {struct dentry *debug_disc_trc;struct dentry *debug_nodelist;struct dentry *vport_debugfs_root; -struct lpfc_disc_trc *disc_trc; +struct lpfc_debugfs_trc *disc_trc;atomic_t disc_trc_cnt;#endif };
@@ -547,6 +547,10 @@ struct lpfc_hba {#ifdef CONFIG_LPFC_DEBUG_FS struct dentry *hba_debugfs_root;atomic_t debugfs_vport_count; +struct dentry *debug_dumpslim; +struct dentry *debug_slow_ring_trc; +struct lpfc_debugfs_trc *slow_ring_trc; +atomic_t slow_ring_trc_cnt;#endif /* Fields used for heart beat. */
drivers/scsi/lpfc/lpfc_hbadisc.c +9 -0
@@ -426,10 +426,19 @@ lpfc_work_done(struct lpfc_hba *phba)spin_lock_irq (&phba->hbalock); control =readl (phba->HCregaddr);if (!(control & (HC_R0INT_ENA <<LPFC_ELS_RING ))) { +lpfc_debugfs_slow_ring_trc (phba, +"WRK Enable ring: cntl:x%x hacopy:x%x" , + control, ha_copy,0 ); + control |= (HC_R0INT_ENA <<LPFC_ELS_RING );writel (control, phba->HCregaddr);readl (phba->HCregaddr);/* flush */ } +else { +lpfc_debugfs_slow_ring_trc (phba, +"WRK Ring ok: cntl:x%x hacopy:x%x" , + control, ha_copy,0 ); + }spin_unlock_irq (&phba->hbalock); }lpfc_work_list_done (phba);
drivers/scsi/lpfc/lpfc_sli.c +37 -0
@@ -395,6 +395,14 @@ lpfc_sli_submit_iocb(struct lpfc_hba *ph*/ nextiocb->iocb.ulpIoTag = (nextiocb->iocb_cmpl) ? nextiocb->iotag :0 ; +if (pring->ringno ==LPFC_ELS_RING ) { +lpfc_debugfs_slow_ring_trc (phba, +"IOCB cmd ring: wd4:x%08x wd6:x%08x wd7:x%08x" , + *(((uint32_t *) &nextiocb->iocb) +4 ), + *(((uint32_t *) &nextiocb->iocb) +6 ), + *(((uint32_t *) &nextiocb->iocb) +7 )); + } +/* * Issue iocb command to adapter */
@@ -1542,6 +1550,14 @@ lpfc_sli_handle_slow_ring_event(struct lif (++pring->rspidx >= portRspMax) pring->rspidx =0 ; +if (pring->ringno ==LPFC_ELS_RING ) { +lpfc_debugfs_slow_ring_trc (phba, +"IOCB rsp ring: wd4:x%08x wd6:x%08x wd7:x%08x" , + *(((uint32_t *) irsp) +4 ), + *(((uint32_t *) irsp) +6 ), + *(((uint32_t *) irsp) +7 )); + } +writel (pring->rspidx, &phba->host_gp[pring->ringno].rspGetInx);if (list_empty (&(pring->iocb_continueq))) {
@@ -3850,12 +3866,33 @@ lpfc_intr_handler(int irq, void *dev_id)if (status &HA_RXMASK ) {spin_lock (&phba->hbalock); control =readl (phba->HCregaddr); + +lpfc_debugfs_slow_ring_trc (phba, +"ISR slow ring: ctl:x%x stat:x%x isrcnt:x%x" , + control, status, + (uint32_t )phba->sli.slistat.sli_intr); +if (control & (HC_R0INT_ENA <<LPFC_ELS_RING )) { +lpfc_debugfs_slow_ring_trc (phba, +"ISR Disable ring:" +"pwork:x%x hawork:x%x wait:x%x" , + phba->work_ha, work_ha_copy, + (uint32_t )((unsigned long ) + phba->work_wait)); + control &= ~(HC_R0INT_ENA <<LPFC_ELS_RING );writel (control, phba->HCregaddr);readl (phba->HCregaddr);/* flush */ } +else { +lpfc_debugfs_slow_ring_trc (phba, +"ISR slow ring: pwork:" +"x%x hawork:x%x wait:x%x" , + phba->work_ha, work_ha_copy, + (uint32_t )((unsigned long ) + phba->work_wait)); + }spin_unlock (&phba->hbalock); } }
drivers/scsi/lpfc/lpfc_vport.c +8 -2
@@ -326,6 +326,8 @@ lpfc_vport_create(struct fc_vport *fc_vp rc =VPORT_OK ; out: +lpfc_printf_vlog (vport,KERN_ERR ,LOG_VPORT , +"1825 Vport Created.\n" );lpfc_host_attrib_init (lpfc_shost_from_vport (vport)); error_out:return rc;
@@ -371,6 +373,8 @@ disable_vport(struct fc_vport *fc_vport)lpfc_mbx_unreg_vpi (vport);lpfc_vport_set_state (vport,FC_VPORT_DISABLED ); +lpfc_printf_vlog (vport,KERN_ERR ,LOG_VPORT , +"1826 Vport Disabled.\n" );return VPORT_OK ; }
@@ -408,7 +412,8 @@ enable_vport(struct fc_vport *fc_vport) }else {lpfc_vport_set_state (vport,FC_VPORT_FAILED ); } - +lpfc_printf_vlog (vport,KERN_ERR ,LOG_VPORT , +"1827 Vport Enabled.\n" );return VPORT_OK ; }
@@ -511,7 +516,8 @@ skip_logo:spin_lock_irq (&phba->hbalock);list_del_init (&vport->listentry);spin_unlock_irq (&phba->hbalock); - +lpfc_printf_vlog (vport,KERN_ERR ,LOG_VPORT , +"1828 Vport Deleted.\n" ); rc =VPORT_OK ; out:scsi_host_put (shost);