diff options
author | James.Smart@Emulex.Com <James.Smart@Emulex.Com> | 2005-06-25 10:34:27 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-07-02 19:55:23 -0400 |
commit | 1f679cafd2d02b7076e9045d9c4fb77ef8d059f2 (patch) | |
tree | 634a1337b734ed2ff8715e4c9368e764a03b6aac /drivers | |
parent | 06325e7459b54fc924d00fe363068f6cbf284571 (diff) |
[SCSI] lpfc: Fix LS_RJT never sent by lpfc_els_unsol_event()
lpfc_els_unsol_event() checks rjt_err to determine is LS_RJT should be
sent. However, rjt_err was set to LSEXP_NOTHING_ELSE (which is 0) in
cases where an LS_RJT should be sent, so rjt_err was never true.
Change lpfc_els_unsol_event() to set rjt_err to 1 when LS_RJT should
be sent.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 68d1b77e0256..2e35bf4eeb0b 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -3139,7 +3139,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3139 | case ELS_CMD_PLOGI: | 3139 | case ELS_CMD_PLOGI: |
3140 | phba->fc_stat.elsRcvPLOGI++; | 3140 | phba->fc_stat.elsRcvPLOGI++; |
3141 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3141 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3142 | rjt_err = LSEXP_NOTHING_MORE; | 3142 | rjt_err = 1; |
3143 | break; | 3143 | break; |
3144 | } | 3144 | } |
3145 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PLOGI); | 3145 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PLOGI); |
@@ -3154,7 +3154,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3154 | case ELS_CMD_LOGO: | 3154 | case ELS_CMD_LOGO: |
3155 | phba->fc_stat.elsRcvLOGO++; | 3155 | phba->fc_stat.elsRcvLOGO++; |
3156 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3156 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3157 | rjt_err = LSEXP_NOTHING_MORE; | 3157 | rjt_err = 1; |
3158 | break; | 3158 | break; |
3159 | } | 3159 | } |
3160 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_LOGO); | 3160 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_LOGO); |
@@ -3162,7 +3162,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3162 | case ELS_CMD_PRLO: | 3162 | case ELS_CMD_PRLO: |
3163 | phba->fc_stat.elsRcvPRLO++; | 3163 | phba->fc_stat.elsRcvPRLO++; |
3164 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3164 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3165 | rjt_err = LSEXP_NOTHING_MORE; | 3165 | rjt_err = 1; |
3166 | break; | 3166 | break; |
3167 | } | 3167 | } |
3168 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLO); | 3168 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLO); |
@@ -3177,7 +3177,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3177 | case ELS_CMD_ADISC: | 3177 | case ELS_CMD_ADISC: |
3178 | phba->fc_stat.elsRcvADISC++; | 3178 | phba->fc_stat.elsRcvADISC++; |
3179 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3179 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3180 | rjt_err = LSEXP_NOTHING_MORE; | 3180 | rjt_err = 1; |
3181 | break; | 3181 | break; |
3182 | } | 3182 | } |
3183 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_ADISC); | 3183 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_ADISC); |
@@ -3185,7 +3185,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3185 | case ELS_CMD_PDISC: | 3185 | case ELS_CMD_PDISC: |
3186 | phba->fc_stat.elsRcvPDISC++; | 3186 | phba->fc_stat.elsRcvPDISC++; |
3187 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3187 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3188 | rjt_err = LSEXP_NOTHING_MORE; | 3188 | rjt_err = 1; |
3189 | break; | 3189 | break; |
3190 | } | 3190 | } |
3191 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PDISC); | 3191 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PDISC); |
@@ -3209,7 +3209,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3209 | case ELS_CMD_PRLI: | 3209 | case ELS_CMD_PRLI: |
3210 | phba->fc_stat.elsRcvPRLI++; | 3210 | phba->fc_stat.elsRcvPRLI++; |
3211 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3211 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3212 | rjt_err = LSEXP_NOTHING_MORE; | 3212 | rjt_err = 1; |
3213 | break; | 3213 | break; |
3214 | } | 3214 | } |
3215 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLI); | 3215 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLI); |
@@ -3220,7 +3220,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3220 | break; | 3220 | break; |
3221 | default: | 3221 | default: |
3222 | /* Unsupported ELS command, reject */ | 3222 | /* Unsupported ELS command, reject */ |
3223 | rjt_err = LSEXP_NOTHING_MORE; | 3223 | rjt_err = 1; |
3224 | 3224 | ||
3225 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ | 3225 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ |
3226 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 3226 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, |
@@ -3236,7 +3236,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3236 | if (rjt_err) { | 3236 | if (rjt_err) { |
3237 | stat.un.b.lsRjtRsvd0 = 0; | 3237 | stat.un.b.lsRjtRsvd0 = 0; |
3238 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | 3238 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; |
3239 | stat.un.b.lsRjtRsnCodeExp = rjt_err; | 3239 | stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; |
3240 | stat.un.b.vendorUnique = 0; | 3240 | stat.un.b.vendorUnique = 0; |
3241 | lpfc_els_rsp_reject(phba, stat.un.lsRjtError, elsiocb, ndlp); | 3241 | lpfc_els_rsp_reject(phba, stat.un.lsRjtError, elsiocb, ndlp); |
3242 | } | 3242 | } |