diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index d546206038bf..233901e9dfde 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -1,27 +1,24 @@ | |||
1 | /******************************************************************* | 1 | /******************************************************************* |
2 | * This file is part of the Emulex Linux Device Driver for * | 2 | * This file is part of the Emulex Linux Device Driver for * |
3 | * Enterprise Fibre Channel Host Bus Adapters. * | 3 | * Fibre Channel Host Bus Adapters. * |
4 | * Refer to the README file included with this package for * | 4 | * Copyright (C) 2004-2005 Emulex. All rights reserved. * |
5 | * driver version and adapter support. * | 5 | * EMULEX and SLI are trademarks of Emulex. * |
6 | * Copyright (C) 2004 Emulex Corporation. * | ||
7 | * www.emulex.com * | 6 | * www.emulex.com * |
7 | * Portions Copyright (C) 2004-2005 Christoph Hellwig * | ||
8 | * * | 8 | * * |
9 | * This program is free software; you can redistribute it and/or * | 9 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 10 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 11 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 12 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 13 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 14 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 15 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 16 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 17 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 18 | * more details, a copy of which can be found in the file COPYING * |
19 | * included with this package. * | ||
19 | *******************************************************************/ | 20 | *******************************************************************/ |
20 | 21 | ||
21 | /* | ||
22 | * $Id: lpfc_hbadisc.c 1.266 2005/04/13 11:59:06EDT sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
26 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
27 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
@@ -61,14 +58,7 @@ static void lpfc_disc_timeout_handler(struct lpfc_hba *); | |||
61 | static void | 58 | static void |
62 | lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) | 59 | lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) |
63 | { | 60 | { |
64 | if (!(ndlp->nlp_type & NLP_FABRIC)) { | 61 | 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 | 62 | ||
73 | spin_lock_irq(phba->host->host_lock); | 63 | spin_lock_irq(phba->host->host_lock); |
74 | if (!(ndlp->nlp_flag & NLP_NODEV_TMO)) { | 64 | if (!(ndlp->nlp_flag & NLP_NODEV_TMO)) { |
@@ -79,12 +69,27 @@ lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) | |||
79 | ndlp->nlp_flag &= ~NLP_NODEV_TMO; | 69 | ndlp->nlp_flag &= ~NLP_NODEV_TMO; |
80 | 70 | ||
81 | if (ndlp->nlp_sid != NLP_NO_SID) { | 71 | if (ndlp->nlp_sid != NLP_NO_SID) { |
72 | warn_on = 1; | ||
82 | /* flush the target */ | 73 | /* flush the target */ |
83 | lpfc_sli_abort_iocb(phba, &phba->sli.ring[phba->sli.fcp_ring], | 74 | lpfc_sli_abort_iocb(phba, &phba->sli.ring[phba->sli.fcp_ring], |
84 | ndlp->nlp_sid, 0, 0, LPFC_CTX_TGT); | 75 | ndlp->nlp_sid, 0, 0, LPFC_CTX_TGT); |
85 | } | 76 | } |
86 | spin_unlock_irq(phba->host->host_lock); | 77 | spin_unlock_irq(phba->host->host_lock); |
87 | 78 | ||
79 | if (warn_on) { | ||
80 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | ||
81 | "%d:0203 Nodev timeout on NPort x%x " | ||
82 | "Data: x%x x%x x%x\n", | ||
83 | phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag, | ||
84 | ndlp->nlp_state, ndlp->nlp_rpi); | ||
85 | } else { | ||
86 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | ||
87 | "%d:0204 Nodev timeout on NPort x%x " | ||
88 | "Data: x%x x%x x%x\n", | ||
89 | phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag, | ||
90 | ndlp->nlp_state, ndlp->nlp_rpi); | ||
91 | } | ||
92 | |||
88 | lpfc_disc_state_machine(phba, ndlp, NULL, NLP_EVT_DEVICE_RM); | 93 | lpfc_disc_state_machine(phba, ndlp, NULL, NLP_EVT_DEVICE_RM); |
89 | return; | 94 | return; |
90 | } | 95 | } |