Hi James (Smart), This is a RFC for additional logging points to lpfc driver. lpfc has a logging system with lpfc_printf_v/log() functions and it gives us valid messages for problem analysis, debugging, etc. I'd like to suggest some additional logging points to it. Some time ago, we have experienced this issue that took us a relatively long time to find out the root cause because we didn't get helpful messages we needed to identify the root cause. From that experience, I think adding these would be helpful to prevent the same situation in the future, Brief descriptions of the issue: One customer noticed, from the boot log, one of their servers didn't detect a tape library at boot time. The root cause was a hardware failure on the tape library and that caused PLOGI to fail. However, lpfc output no messages indicating the PLOGI failure, and thus that did not give us a quick idea of narrowing down to the focus to a hardware failure. Fortunately, the customer let us make a debug lpfc driver with some additional logging points, and finally we found the cause, but it's not always the case. Since each message of lpfc has a four digit ID, in the proposal patch, I just put 'xxxx' for now. This applies to 2.6.33-rc7. It'd be really great if something like this patch would be included. Thanks, Kei Signed-off-by: Kei Tokunaga <tokunaga.keiich@xxxxxxxxxxxxxx> --- linux-2.6.33-rc7-log-kei/drivers/scsi/lpfc/lpfc_els.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff -puN drivers/scsi/lpfc/lpfc_els.c~lpfc_printf_log_additions drivers/scsi/lpfc/lpfc_els.c --- linux-2.6.33-rc7-log/drivers/scsi/lpfc/lpfc_els.c~lpfc_printf_log_additions 2010-02-12 11:21:49.000000000 +0900 +++ linux-2.6.33-rc7-log-kei/drivers/scsi/lpfc/lpfc_els.c 2010-02-12 15:11:31.000000000 +0900 @@ -797,7 +797,7 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phb } /* FLOGI failure */ - lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, + lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, "0100 FLOGI failure Data: x%x x%x " "x%x\n", irsp->ulpStatus, irsp->un.ulpWord[4], @@ -1397,6 +1397,9 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phb goto out; } /* PLOGI failed */ + lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, + "xxxx PLOGI failure Data: x%x x%x x%x\n", + ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4]); /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ if (lpfc_error_lost_link(irsp)) rc = NLP_STE_FREED_NODE; @@ -1565,6 +1568,9 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba goto out; } /* PRLI failed */ + lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, + "xxxx PRLI failure Data: x%x x%x x%x\n", + ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4]); /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ if (lpfc_error_lost_link(irsp)) goto out; @@ -1848,6 +1854,9 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phb goto out; } /* ADISC failed */ + lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, + "xxxx ADISC failure Data: x%x x%x x%x\n", + ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4]); /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ if (!lpfc_error_lost_link(irsp)) lpfc_disc_state_machine(vport, ndlp, cmdiocb, @@ -1997,6 +2006,9 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba /* ELS command is being retried */ goto out; /* LOGO failed */ + lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, + "xxxx LOGO failure Data: x%x x%x x%x\n", + ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4]); /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ if (lpfc_error_lost_link(irsp)) goto out; diff -puN drivers/scsi/lpfc/lpfc_scsi.c~lpfc_printf_log_additions drivers/scsi/lpfc/lpfc_scsi.c diff -puN drivers/scsi/lpfc/lpfc_sli.c~lpfc_printf_log_additions drivers/scsi/lpfc/lpfc_sli.c _ -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html