aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hbadisc.c
diff options
context:
space:
mode:
authorJames.Smart@Emulex.Com <James.Smart@Emulex.Com>2005-06-25 10:34:04 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-02 18:04:06 -0400
commit6e8215e48865bda2e07c1c0633952e35fa3b170c (patch)
treee058445be102bd68e4f793d7336264ba1cd35034 /drivers/scsi/lpfc/lpfc_hbadisc.c
parent4cc2da1d84eeddb9e9259e61efd58691399434b2 (diff)
[SCSI] Fix issue where all hosts log nodev message for other initiators
Fix issue where all hosts connected to SAN get spammed with nodev message when other initiators go away. Display nodev message only when FC targets go away. However this behavior will be overridden if LOG_DISCOVERY is set. 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_hbadisc.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index d546206038bf..4a84803ee839 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -61,14 +61,7 @@ static void lpfc_disc_timeout_handler(struct lpfc_hba *);
61static void 61static void
62lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) 62lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
63{ 63{
64 if (!(ndlp->nlp_type & NLP_FABRIC)) { 64 int warn_on = 0;
65 /* Nodev timeout on NPort <nlp_DID> */
66 lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY,
67 "%d:0203 Nodev timeout on NPort x%x "
68 "Data: x%x x%x x%x\n",
69 phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag,
70 ndlp->nlp_state, ndlp->nlp_rpi);
71 }
72 65
73 spin_lock_irq(phba->host->host_lock); 66 spin_lock_irq(phba->host->host_lock);
74 if (!(ndlp->nlp_flag & NLP_NODEV_TMO)) { 67 if (!(ndlp->nlp_flag & NLP_NODEV_TMO)) {
@@ -79,12 +72,27 @@ lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
79 ndlp->nlp_flag &= ~NLP_NODEV_TMO; 72 ndlp->nlp_flag &= ~NLP_NODEV_TMO;
80 73
81 if (ndlp->nlp_sid != NLP_NO_SID) { 74 if (ndlp->nlp_sid != NLP_NO_SID) {
75 warn_on = 1;
82 /* flush the target */ 76 /* flush the target */
83 lpfc_sli_abort_iocb(phba, &phba->sli.ring[phba->sli.fcp_ring], 77 lpfc_sli_abort_iocb(phba, &phba->sli.ring[phba->sli.fcp_ring],
84 ndlp->nlp_sid, 0, 0, LPFC_CTX_TGT); 78 ndlp->nlp_sid, 0, 0, LPFC_CTX_TGT);
85 } 79 }
86 spin_unlock_irq(phba->host->host_lock); 80 spin_unlock_irq(phba->host->host_lock);
87 81
82 if (warn_on) {
83 lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY,
84 "%d:0203 Nodev timeout on NPort x%x "
85 "Data: x%x x%x x%x\n",
86 phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag,
87 ndlp->nlp_state, ndlp->nlp_rpi);
88 } else {
89 lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY,
90 "%d:0204 Nodev timeout on NPort x%x "
91 "Data: x%x x%x x%x\n",
92 phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag,
93 ndlp->nlp_state, ndlp->nlp_rpi);
94 }
95
88 lpfc_disc_state_machine(phba, ndlp, NULL, NLP_EVT_DEVICE_RM); 96 lpfc_disc_state_machine(phba, ndlp, NULL, NLP_EVT_DEVICE_RM);
89 return; 97 return;
90} 98}