mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
scsi: lpfc: Add additional discovery log messages
When debugging a recent discovery customer problem it was very hard to tell what was happening with the existing discovery log messages. To fully debug the issue additional log messages were necessary. Add or extend log messages so that sufficient information is present for debugging. Link: https://lore.kernel.org/r/20191018211832.7917-16-jsmart2021@gmail.com Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
83c6cb1ae8
commit
b4b3417cf6
3 changed files with 62 additions and 9 deletions
|
@ -763,9 +763,11 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||||
cpu_to_be16(SLI_CT_RESPONSE_FS_ACC)) {
|
cpu_to_be16(SLI_CT_RESPONSE_FS_ACC)) {
|
||||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
"0208 NameServer Rsp Data: x%x x%x "
|
"0208 NameServer Rsp Data: x%x x%x "
|
||||||
"sz x%x\n",
|
"x%x x%x sz x%x\n",
|
||||||
vport->fc_flag,
|
vport->fc_flag,
|
||||||
CTreq->un.gid.Fc4Type,
|
CTreq->un.gid.Fc4Type,
|
||||||
|
vport->num_disc_nodes,
|
||||||
|
vport->gidft_inp,
|
||||||
irsp->un.genreq64.bdl.bdeSize);
|
irsp->un.genreq64.bdl.bdeSize);
|
||||||
|
|
||||||
lpfc_ns_rsp(vport,
|
lpfc_ns_rsp(vport,
|
||||||
|
@ -961,9 +963,13 @@ lpfc_cmpl_ct_cmd_gid_pt(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||||
if (CTrsp->CommandResponse.bits.CmdRsp ==
|
if (CTrsp->CommandResponse.bits.CmdRsp ==
|
||||||
cpu_to_be16(SLI_CT_RESPONSE_FS_ACC)) {
|
cpu_to_be16(SLI_CT_RESPONSE_FS_ACC)) {
|
||||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
"4105 NameServer Rsp Data: x%x x%x\n",
|
"4105 NameServer Rsp Data: x%x x%x "
|
||||||
|
"x%x x%x sz x%x\n",
|
||||||
vport->fc_flag,
|
vport->fc_flag,
|
||||||
CTreq->un.gid.Fc4Type);
|
CTreq->un.gid.Fc4Type,
|
||||||
|
vport->num_disc_nodes,
|
||||||
|
vport->gidft_inp,
|
||||||
|
irsp->un.genreq64.bdl.bdeSize);
|
||||||
|
|
||||||
lpfc_ns_rsp(vport,
|
lpfc_ns_rsp(vport,
|
||||||
outp,
|
outp,
|
||||||
|
@ -1025,6 +1031,11 @@ lpfc_cmpl_ct_cmd_gid_pt(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||||
}
|
}
|
||||||
vport->gidft_inp--;
|
vport->gidft_inp--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
|
"6450 GID_PT cmpl inp %d disc %d\n",
|
||||||
|
vport->gidft_inp, vport->num_disc_nodes);
|
||||||
|
|
||||||
/* Link up / RSCN discovery */
|
/* Link up / RSCN discovery */
|
||||||
if ((vport->num_disc_nodes == 0) &&
|
if ((vport->num_disc_nodes == 0) &&
|
||||||
(vport->gidft_inp == 0)) {
|
(vport->gidft_inp == 0)) {
|
||||||
|
@ -1159,6 +1170,11 @@ out:
|
||||||
/* Link up / RSCN discovery */
|
/* Link up / RSCN discovery */
|
||||||
if (vport->num_disc_nodes)
|
if (vport->num_disc_nodes)
|
||||||
vport->num_disc_nodes--;
|
vport->num_disc_nodes--;
|
||||||
|
|
||||||
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
|
"6451 GFF_ID cmpl inp %d disc %d\n",
|
||||||
|
vport->gidft_inp, vport->num_disc_nodes);
|
||||||
|
|
||||||
if (vport->num_disc_nodes == 0) {
|
if (vport->num_disc_nodes == 0) {
|
||||||
/*
|
/*
|
||||||
* The driver has cycled through all Nports in the RSCN payload.
|
* The driver has cycled through all Nports in the RSCN payload.
|
||||||
|
|
|
@ -5265,6 +5265,11 @@ lpfc_els_disc_plogi(struct lpfc_vport *vport)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
|
"6452 Discover PLOGI %d flag x%x\n",
|
||||||
|
sentplogi, vport->fc_flag);
|
||||||
|
|
||||||
if (sentplogi) {
|
if (sentplogi) {
|
||||||
lpfc_set_disctmo(vport);
|
lpfc_set_disctmo(vport);
|
||||||
}
|
}
|
||||||
|
@ -6668,9 +6673,10 @@ lpfc_els_handle_rscn(struct lpfc_vport *vport)
|
||||||
|
|
||||||
/* RSCN processed */
|
/* RSCN processed */
|
||||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
"0215 RSCN processed Data: x%x x%x x%x x%x\n",
|
"0215 RSCN processed Data: x%x x%x x%x x%x x%x x%x\n",
|
||||||
vport->fc_flag, 0, vport->fc_rscn_id_cnt,
|
vport->fc_flag, 0, vport->fc_rscn_id_cnt,
|
||||||
vport->port_state);
|
vport->port_state, vport->num_disc_nodes,
|
||||||
|
vport->gidft_inp);
|
||||||
|
|
||||||
/* To process RSCN, first compare RSCN data with NameServer */
|
/* To process RSCN, first compare RSCN data with NameServer */
|
||||||
vport->fc_ns_retry = 0;
|
vport->fc_ns_retry = 0;
|
||||||
|
|
|
@ -5404,6 +5404,13 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did)
|
||||||
if (!ndlp)
|
if (!ndlp)
|
||||||
return NULL;
|
return NULL;
|
||||||
lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
|
lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
|
||||||
|
|
||||||
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
|
"6453 Setup New Node 2B_DISC x%x "
|
||||||
|
"Data:x%x x%x x%x\n",
|
||||||
|
ndlp->nlp_DID, ndlp->nlp_flag,
|
||||||
|
ndlp->nlp_state, vport->fc_flag);
|
||||||
|
|
||||||
spin_lock_irq(shost->host_lock);
|
spin_lock_irq(shost->host_lock);
|
||||||
ndlp->nlp_flag |= NLP_NPR_2B_DISC;
|
ndlp->nlp_flag |= NLP_NPR_2B_DISC;
|
||||||
spin_unlock_irq(shost->host_lock);
|
spin_unlock_irq(shost->host_lock);
|
||||||
|
@ -5417,6 +5424,12 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did)
|
||||||
"0014 Could not enable ndlp\n");
|
"0014 Could not enable ndlp\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
|
"6454 Setup Enabled Node 2B_DISC x%x "
|
||||||
|
"Data:x%x x%x x%x\n",
|
||||||
|
ndlp->nlp_DID, ndlp->nlp_flag,
|
||||||
|
ndlp->nlp_state, vport->fc_flag);
|
||||||
|
|
||||||
spin_lock_irq(shost->host_lock);
|
spin_lock_irq(shost->host_lock);
|
||||||
ndlp->nlp_flag |= NLP_NPR_2B_DISC;
|
ndlp->nlp_flag |= NLP_NPR_2B_DISC;
|
||||||
spin_unlock_irq(shost->host_lock);
|
spin_unlock_irq(shost->host_lock);
|
||||||
|
@ -5436,6 +5449,12 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did)
|
||||||
*/
|
*/
|
||||||
lpfc_cancel_retry_delay_tmo(vport, ndlp);
|
lpfc_cancel_retry_delay_tmo(vport, ndlp);
|
||||||
|
|
||||||
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
|
"6455 Setup RSCN Node 2B_DISC x%x "
|
||||||
|
"Data:x%x x%x x%x\n",
|
||||||
|
ndlp->nlp_DID, ndlp->nlp_flag,
|
||||||
|
ndlp->nlp_state, vport->fc_flag);
|
||||||
|
|
||||||
/* NVME Target mode waits until rport is known to be
|
/* NVME Target mode waits until rport is known to be
|
||||||
* impacted by the RSCN before it transitions. No
|
* impacted by the RSCN before it transitions. No
|
||||||
* active management - just go to NPR provided the
|
* active management - just go to NPR provided the
|
||||||
|
@ -5458,9 +5477,21 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did)
|
||||||
spin_lock_irq(shost->host_lock);
|
spin_lock_irq(shost->host_lock);
|
||||||
ndlp->nlp_flag |= NLP_NPR_2B_DISC;
|
ndlp->nlp_flag |= NLP_NPR_2B_DISC;
|
||||||
spin_unlock_irq(shost->host_lock);
|
spin_unlock_irq(shost->host_lock);
|
||||||
} else
|
|
||||||
ndlp = NULL;
|
|
||||||
} else {
|
} else {
|
||||||
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
|
"6456 Skip Setup RSCN Node x%x "
|
||||||
|
"Data:x%x x%x x%x\n",
|
||||||
|
ndlp->nlp_DID, ndlp->nlp_flag,
|
||||||
|
ndlp->nlp_state, vport->fc_flag);
|
||||||
|
ndlp = NULL;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
|
"6457 Setup Active Node 2B_DISC x%x "
|
||||||
|
"Data:x%x x%x x%x\n",
|
||||||
|
ndlp->nlp_DID, ndlp->nlp_flag,
|
||||||
|
ndlp->nlp_state, vport->fc_flag);
|
||||||
|
|
||||||
/* If the initiator received a PLOGI from this NPort or if the
|
/* If the initiator received a PLOGI from this NPort or if the
|
||||||
* initiator is already in the process of discovery on it,
|
* initiator is already in the process of discovery on it,
|
||||||
* there's no need to try to discover it again.
|
* there's no need to try to discover it again.
|
||||||
|
@ -5612,10 +5643,10 @@ lpfc_disc_start(struct lpfc_vport *vport)
|
||||||
|
|
||||||
/* Start Discovery state <hba_state> */
|
/* Start Discovery state <hba_state> */
|
||||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||||
"0202 Start Discovery hba state x%x "
|
"0202 Start Discovery port state x%x "
|
||||||
"Data: x%x x%x x%x\n",
|
"flg x%x Data: x%x x%x x%x\n",
|
||||||
vport->port_state, vport->fc_flag, vport->fc_plogi_cnt,
|
vport->port_state, vport->fc_flag, vport->fc_plogi_cnt,
|
||||||
vport->fc_adisc_cnt);
|
vport->fc_adisc_cnt, vport->fc_npr_cnt);
|
||||||
|
|
||||||
/* First do ADISCs - if any */
|
/* First do ADISCs - if any */
|
||||||
num_sent = lpfc_els_disc_adisc(vport);
|
num_sent = lpfc_els_disc_adisc(vport);
|
||||||
|
|
Loading…
Add table
Reference in a new issue