diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-08-02 11:10:09 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-08-01 12:21:26 -0500 |
commit | e8b62011d88d6fdba585fb2bb77c9274a63cadab (patch) | |
tree | 838c3abee73ec571456ae3ae83e51ecbed8e4a64 /drivers/scsi/lpfc/lpfc_debugfs.c | |
parent | 3de2a653a127c468284c48e233719dc39769e354 (diff) |
[SCSI] lpfc 8.2.2 : Rework the lpfc_printf_log() macro
Rework the lpfc_printf_log() macro so that logging is enabled on a
per-vport basis. Used to be on a physical-port basis, thus logging
with large numbers of vports became a mess. Required redefinition of
the macro, and an update of every use.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_debugfs.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_debugfs.c | 62 |
1 files changed, 26 insertions, 36 deletions
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index 2310a2d1d8ce..dc7b858b95fa 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c @@ -642,13 +642,11 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) lpfc_debugfs_root = debugfs_create_dir("lpfc", NULL); atomic_set(&lpfc_debugfs_hba_count, 0); if (!lpfc_debugfs_root) { - lpfc_printf_log(phba, KERN_ERR, LOG_INIT, - "%d:0409 Cannot create debugfs root (lpfc)", - phba->brd_no); + lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, + "0409 Cannot create debugfs root\n"); goto debug_failed; } } - if (!lpfc_debugfs_start_time) lpfc_debugfs_start_time = jiffies; @@ -658,9 +656,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) phba->hba_debugfs_root = debugfs_create_dir(name, lpfc_debugfs_root); if (!phba->hba_debugfs_root) { - lpfc_printf_log(phba, KERN_ERR, LOG_INIT, - "%d:0409 Cannot create debugfs hba (lpfc%d)", - phba->brd_no, phba->brd_no); + lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, + "0409 Cannot create debugfs hba\n"); goto debug_failed; } atomic_inc(&lpfc_debugfs_hba_count); @@ -673,9 +670,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) phba->hba_debugfs_root, phba, &lpfc_debugfs_op_dumpslim); if (!phba->debug_dumpslim) { - lpfc_printf_log(phba, KERN_ERR, LOG_INIT, - "%d:0409 Cannot create debugfs dumpslim (lpfc%d)", - phba->brd_no, phba->brd_no); + lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, + "0409 Cannot create debugfs dumpslim\n"); goto debug_failed; } @@ -692,8 +688,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) } lpfc_debugfs_max_slow_ring_trc = (1 << i); printk(KERN_ERR - "lpfc_debugfs_max_slow_ring_trc change to %d\n", - lpfc_debugfs_max_slow_ring_trc); + "lpfc_debugfs_max_disc_trc changed to " + "%d\n", lpfc_debugfs_max_disc_trc); } } @@ -704,10 +700,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) phba->hba_debugfs_root, phba, &lpfc_debugfs_op_slow_ring_trc); if (!phba->debug_slow_ring_trc) { - lpfc_printf_log(phba, KERN_ERR, LOG_INIT, - "%d:0409 Cannot create debugfs " - "slow_ring_trace (lpfc%d)", - phba->brd_no, phba->brd_no); + lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, + "0409 Cannot create debugfs " + "slow_ring_trace\n"); goto debug_failed; } if (!phba->slow_ring_trc) { @@ -716,10 +711,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) lpfc_debugfs_max_slow_ring_trc), GFP_KERNEL); if (!phba->slow_ring_trc) { - lpfc_printf_log(phba, KERN_ERR, LOG_INIT, - "%d:0409 Cannot create debugfs " - "slow_ring buffer (lpfc%d)", - phba->brd_no, phba->brd_no); + lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, + "0409 Cannot create debugfs " + "slow_ring buffer\n"); goto debug_failed; } atomic_set(&phba->slow_ring_trc_cnt, 0); @@ -734,9 +728,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) vport->vport_debugfs_root = debugfs_create_dir(name, phba->hba_debugfs_root); if (!vport->vport_debugfs_root) { - lpfc_printf_log(phba, KERN_ERR, LOG_INIT, - "%d:0409 Cant create debugfs vport%d (lpfc%d)", - phba->brd_no, vport->vpi, phba->brd_no); + lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, + "0409 Cant create debugfs"); goto debug_failed; } atomic_inc(&phba->debugfs_vport_count); @@ -754,8 +747,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) } lpfc_debugfs_max_disc_trc = (1 << i); printk(KERN_ERR - "lpfc_debugfs_max_disc_trc changed to %d\n", - lpfc_debugfs_max_disc_trc); + "lpfc_debugfs_max_disc_trc changed to %d\n", + lpfc_debugfs_max_disc_trc); } } @@ -764,10 +757,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) GFP_KERNEL); if (!vport->disc_trc) { - lpfc_printf_log(phba, KERN_ERR, LOG_INIT, - "%d:0409 Cannot create debugfs " - "vport%d disc trace buffer (lpfc%d)", - phba->brd_no, vport->vpi, phba->brd_no); + lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, + "0409 Cannot create debugfs disc trace " + "buffer\n"); goto debug_failed; } atomic_set(&vport->disc_trc_cnt, 0); @@ -780,10 +772,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) vport->vport_debugfs_root, vport, &lpfc_debugfs_op_disc_trc); if (!vport->debug_disc_trc) { - lpfc_printf_log(phba, KERN_ERR, LOG_INIT, - "%d:0409 Cannot create debugfs " - "vport%d discovery_trace (lpfc%d)", - phba->brd_no, vport->vpi, phba->brd_no); + lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, + "0409 Cannot create debugfs " + "discovery_trace\n"); goto debug_failed; } snprintf(name, sizeof(name), "nodelist"); @@ -792,9 +783,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) vport->vport_debugfs_root, vport, &lpfc_debugfs_op_nodelist); if (!vport->debug_nodelist) { - lpfc_printf_log(phba, KERN_ERR, LOG_INIT, - "%d:0409 Cant create debugfs vport%d nodelist (lpfc%d)", - phba->brd_no, vport->vpi, phba->brd_no); + lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, + "0409 Cant create debugfs nodelist"); goto debug_failed; } debug_failed: |