提交 303f2f9c 编写于 作者: J James Smart 提交者: James Bottomley

[SCSI] lpfc 8.3.37: Fixed ELS_REC received on the unsolicited receive queue

Signed-off-by: NJames Smart <james.smart@emulex.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 fe8f7f9c
...@@ -6517,7 +6517,8 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -6517,7 +6517,8 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_nodelist *ndlp; struct lpfc_nodelist *ndlp;
struct ls_rjt stat; struct ls_rjt stat;
uint32_t *payload; uint32_t *payload;
uint32_t cmd, did, newnode, rjt_err = 0; uint32_t cmd, did, newnode;
uint8_t rjt_exp, rjt_err = 0;
IOCB_t *icmd = &elsiocb->iocb; IOCB_t *icmd = &elsiocb->iocb;
if (!vport || !(elsiocb->context2)) if (!vport || !(elsiocb->context2))
...@@ -6606,12 +6607,14 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -6606,12 +6607,14 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
/* If Nport discovery is delayed, reject PLOGIs */ /* If Nport discovery is delayed, reject PLOGIs */
if (vport->fc_flag & FC_DISC_DELAYED) { if (vport->fc_flag & FC_DISC_DELAYED) {
rjt_err = LSRJT_UNABLE_TPC; rjt_err = LSRJT_UNABLE_TPC;
rjt_exp = LSEXP_NOTHING_MORE;
break; break;
} }
if (vport->port_state < LPFC_DISC_AUTH) { if (vport->port_state < LPFC_DISC_AUTH) {
if (!(phba->pport->fc_flag & FC_PT2PT) || if (!(phba->pport->fc_flag & FC_PT2PT) ||
(phba->pport->fc_flag & FC_PT2PT_PLOGI)) { (phba->pport->fc_flag & FC_PT2PT_PLOGI)) {
rjt_err = LSRJT_UNABLE_TPC; rjt_err = LSRJT_UNABLE_TPC;
rjt_exp = LSEXP_NOTHING_MORE;
break; break;
} }
/* We get here, and drop thru, if we are PT2PT with /* We get here, and drop thru, if we are PT2PT with
...@@ -6648,6 +6651,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -6648,6 +6651,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
lpfc_send_els_event(vport, ndlp, payload); lpfc_send_els_event(vport, ndlp, payload);
if (vport->port_state < LPFC_DISC_AUTH) { if (vport->port_state < LPFC_DISC_AUTH) {
rjt_err = LSRJT_UNABLE_TPC; rjt_err = LSRJT_UNABLE_TPC;
rjt_exp = LSEXP_NOTHING_MORE;
break; break;
} }
lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_LOGO); lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_LOGO);
...@@ -6661,6 +6665,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -6661,6 +6665,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
lpfc_send_els_event(vport, ndlp, payload); lpfc_send_els_event(vport, ndlp, payload);
if (vport->port_state < LPFC_DISC_AUTH) { if (vport->port_state < LPFC_DISC_AUTH) {
rjt_err = LSRJT_UNABLE_TPC; rjt_err = LSRJT_UNABLE_TPC;
rjt_exp = LSEXP_NOTHING_MORE;
break; break;
} }
lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_PRLO); lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_PRLO);
...@@ -6680,6 +6685,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -6680,6 +6685,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
phba->fc_stat.elsRcvADISC++; phba->fc_stat.elsRcvADISC++;
if (vport->port_state < LPFC_DISC_AUTH) { if (vport->port_state < LPFC_DISC_AUTH) {
rjt_err = LSRJT_UNABLE_TPC; rjt_err = LSRJT_UNABLE_TPC;
rjt_exp = LSEXP_NOTHING_MORE;
break; break;
} }
lpfc_disc_state_machine(vport, ndlp, elsiocb, lpfc_disc_state_machine(vport, ndlp, elsiocb,
...@@ -6693,6 +6699,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -6693,6 +6699,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
phba->fc_stat.elsRcvPDISC++; phba->fc_stat.elsRcvPDISC++;
if (vport->port_state < LPFC_DISC_AUTH) { if (vport->port_state < LPFC_DISC_AUTH) {
rjt_err = LSRJT_UNABLE_TPC; rjt_err = LSRJT_UNABLE_TPC;
rjt_exp = LSEXP_NOTHING_MORE;
break; break;
} }
lpfc_disc_state_machine(vport, ndlp, elsiocb, lpfc_disc_state_machine(vport, ndlp, elsiocb,
...@@ -6730,6 +6737,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -6730,6 +6737,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
phba->fc_stat.elsRcvPRLI++; phba->fc_stat.elsRcvPRLI++;
if (vport->port_state < LPFC_DISC_AUTH) { if (vport->port_state < LPFC_DISC_AUTH) {
rjt_err = LSRJT_UNABLE_TPC; rjt_err = LSRJT_UNABLE_TPC;
rjt_exp = LSEXP_NOTHING_MORE;
break; break;
} }
lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_PRLI); lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_PRLI);
...@@ -6813,6 +6821,11 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -6813,6 +6821,11 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
if (newnode) if (newnode)
lpfc_nlp_put(ndlp); lpfc_nlp_put(ndlp);
break; break;
case ELS_CMD_REC:
/* receive this due to exchange closed */
rjt_err = LSRJT_UNABLE_TPC;
rjt_exp = LSEXP_INVALID_OX_RX;
break;
default: default:
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL,
"RCV ELS cmd: cmd:x%x did:x%x/ste:x%x", "RCV ELS cmd: cmd:x%x did:x%x/ste:x%x",
...@@ -6820,6 +6833,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -6820,6 +6833,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
/* Unsupported ELS command, reject */ /* Unsupported ELS command, reject */
rjt_err = LSRJT_CMD_UNSUPPORTED; rjt_err = LSRJT_CMD_UNSUPPORTED;
rjt_exp = LSEXP_NOTHING_MORE;
/* Unknown ELS command <elsCmd> received from NPORT <did> */ /* Unknown ELS command <elsCmd> received from NPORT <did> */
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
...@@ -6834,7 +6848,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -6834,7 +6848,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
if (rjt_err) { if (rjt_err) {
memset(&stat, 0, sizeof(stat)); memset(&stat, 0, sizeof(stat));
stat.un.b.lsRjtRsnCode = rjt_err; stat.un.b.lsRjtRsnCode = rjt_err;
stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; stat.un.b.lsRjtRsnCodeExp = rjt_exp;
lpfc_els_rsp_reject(vport, stat.un.lsRjtError, elsiocb, ndlp, lpfc_els_rsp_reject(vport, stat.un.lsRjtError, elsiocb, ndlp,
NULL); NULL);
} }
......
...@@ -538,6 +538,7 @@ struct fc_vft_header { ...@@ -538,6 +538,7 @@ struct fc_vft_header {
#define ELS_CMD_ECHO 0x10000000 #define ELS_CMD_ECHO 0x10000000
#define ELS_CMD_TEST 0x11000000 #define ELS_CMD_TEST 0x11000000
#define ELS_CMD_RRQ 0x12000000 #define ELS_CMD_RRQ 0x12000000
#define ELS_CMD_REC 0x13000000
#define ELS_CMD_PRLI 0x20100014 #define ELS_CMD_PRLI 0x20100014
#define ELS_CMD_PRLO 0x21100014 #define ELS_CMD_PRLO 0x21100014
#define ELS_CMD_PRLO_ACC 0x02100014 #define ELS_CMD_PRLO_ACC 0x02100014
...@@ -574,6 +575,7 @@ struct fc_vft_header { ...@@ -574,6 +575,7 @@ struct fc_vft_header {
#define ELS_CMD_ECHO 0x10 #define ELS_CMD_ECHO 0x10
#define ELS_CMD_TEST 0x11 #define ELS_CMD_TEST 0x11
#define ELS_CMD_RRQ 0x12 #define ELS_CMD_RRQ 0x12
#define ELS_CMD_REC 0x13
#define ELS_CMD_PRLI 0x14001020 #define ELS_CMD_PRLI 0x14001020
#define ELS_CMD_PRLO 0x14001021 #define ELS_CMD_PRLO 0x14001021
#define ELS_CMD_PRLO_ACC 0x14001002 #define ELS_CMD_PRLO_ACC 0x14001002
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册