diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 68d1b77e0256..2b1c9572dae7 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.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_els.c 1.186 2005/04/13 14:26:55EDT 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/interrupt.h> | 24 | #include <linux/interrupt.h> |
@@ -3139,7 +3136,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3139 | case ELS_CMD_PLOGI: | 3136 | case ELS_CMD_PLOGI: |
3140 | phba->fc_stat.elsRcvPLOGI++; | 3137 | phba->fc_stat.elsRcvPLOGI++; |
3141 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3138 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3142 | rjt_err = LSEXP_NOTHING_MORE; | 3139 | rjt_err = 1; |
3143 | break; | 3140 | break; |
3144 | } | 3141 | } |
3145 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PLOGI); | 3142 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PLOGI); |
@@ -3154,7 +3151,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3154 | case ELS_CMD_LOGO: | 3151 | case ELS_CMD_LOGO: |
3155 | phba->fc_stat.elsRcvLOGO++; | 3152 | phba->fc_stat.elsRcvLOGO++; |
3156 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3153 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3157 | rjt_err = LSEXP_NOTHING_MORE; | 3154 | rjt_err = 1; |
3158 | break; | 3155 | break; |
3159 | } | 3156 | } |
3160 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_LOGO); | 3157 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_LOGO); |
@@ -3162,7 +3159,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3162 | case ELS_CMD_PRLO: | 3159 | case ELS_CMD_PRLO: |
3163 | phba->fc_stat.elsRcvPRLO++; | 3160 | phba->fc_stat.elsRcvPRLO++; |
3164 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3161 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3165 | rjt_err = LSEXP_NOTHING_MORE; | 3162 | rjt_err = 1; |
3166 | break; | 3163 | break; |
3167 | } | 3164 | } |
3168 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLO); | 3165 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLO); |
@@ -3177,7 +3174,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3177 | case ELS_CMD_ADISC: | 3174 | case ELS_CMD_ADISC: |
3178 | phba->fc_stat.elsRcvADISC++; | 3175 | phba->fc_stat.elsRcvADISC++; |
3179 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3176 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3180 | rjt_err = LSEXP_NOTHING_MORE; | 3177 | rjt_err = 1; |
3181 | break; | 3178 | break; |
3182 | } | 3179 | } |
3183 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_ADISC); | 3180 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_ADISC); |
@@ -3185,7 +3182,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3185 | case ELS_CMD_PDISC: | 3182 | case ELS_CMD_PDISC: |
3186 | phba->fc_stat.elsRcvPDISC++; | 3183 | phba->fc_stat.elsRcvPDISC++; |
3187 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3184 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3188 | rjt_err = LSEXP_NOTHING_MORE; | 3185 | rjt_err = 1; |
3189 | break; | 3186 | break; |
3190 | } | 3187 | } |
3191 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PDISC); | 3188 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PDISC); |
@@ -3209,7 +3206,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3209 | case ELS_CMD_PRLI: | 3206 | case ELS_CMD_PRLI: |
3210 | phba->fc_stat.elsRcvPRLI++; | 3207 | phba->fc_stat.elsRcvPRLI++; |
3211 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3208 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3212 | rjt_err = LSEXP_NOTHING_MORE; | 3209 | rjt_err = 1; |
3213 | break; | 3210 | break; |
3214 | } | 3211 | } |
3215 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLI); | 3212 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLI); |
@@ -3220,7 +3217,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3220 | break; | 3217 | break; |
3221 | default: | 3218 | default: |
3222 | /* Unsupported ELS command, reject */ | 3219 | /* Unsupported ELS command, reject */ |
3223 | rjt_err = LSEXP_NOTHING_MORE; | 3220 | rjt_err = 1; |
3224 | 3221 | ||
3225 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ | 3222 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ |
3226 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 3223 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, |
@@ -3236,7 +3233,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3236 | if (rjt_err) { | 3233 | if (rjt_err) { |
3237 | stat.un.b.lsRjtRsvd0 = 0; | 3234 | stat.un.b.lsRjtRsvd0 = 0; |
3238 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | 3235 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; |
3239 | stat.un.b.lsRjtRsnCodeExp = rjt_err; | 3236 | stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; |
3240 | stat.un.b.vendorUnique = 0; | 3237 | stat.un.b.vendorUnique = 0; |
3241 | lpfc_els_rsp_reject(phba, stat.un.lsRjtError, elsiocb, ndlp); | 3238 | lpfc_els_rsp_reject(phba, stat.un.lsRjtError, elsiocb, ndlp); |
3242 | } | 3239 | } |