Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c868595d authored by James Smart's avatar James Smart Committed by James Bottomley
Browse files

[SCSI] lpfc 8.3.6 : FCoE Protocol Fixes



FCoE Protocol fixes.
 - Fixed FIP frame designation for ELS commands.
 - Fix CVL received on Port 1 not processed by driver.
 - Fix Zeroed frame on wire after FLOGI
 - Fix vport keep-alive does not contain the correct WWN.

Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 832151f4
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -290,8 +290,8 @@ struct lpfc_vport {


	uint16_t vpi;
	uint16_t vpi;
	uint16_t vfi;
	uint16_t vfi;
	uint8_t vfi_state;
	uint8_t vpi_state;
#define LPFC_VFI_REGISTERED	0x1
#define LPFC_VPI_REGISTERED	0x1


	uint32_t fc_flag;	/* FC flags */
	uint32_t fc_flag;	/* FC flags */
/* Several of these flags are HBA centric and should be moved to
/* Several of these flags are HBA centric and should be moved to
+17 −4
Original line number Original line Diff line number Diff line
@@ -177,9 +177,22 @@ lpfc_prep_els_iocb(struct lpfc_vport *vport, uint8_t expectRsp,
		((elscmd == ELS_CMD_FLOGI) ||
		((elscmd == ELS_CMD_FLOGI) ||
		 (elscmd == ELS_CMD_FDISC) ||
		 (elscmd == ELS_CMD_FDISC) ||
		 (elscmd == ELS_CMD_LOGO)))
		 (elscmd == ELS_CMD_LOGO)))
		elsiocb->iocb_flag |= LPFC_FIP_ELS;
		switch (elscmd) {
		case ELS_CMD_FLOGI:
		elsiocb->iocb_flag |= ((ELS_ID_FLOGI << LPFC_FIP_ELS_ID_SHIFT)
					& LPFC_FIP_ELS_ID_MASK);
		break;
		case ELS_CMD_FDISC:
		elsiocb->iocb_flag |= ((ELS_ID_FDISC << LPFC_FIP_ELS_ID_SHIFT)
					& LPFC_FIP_ELS_ID_MASK);
		break;
		case ELS_CMD_LOGO:
		elsiocb->iocb_flag |= ((ELS_ID_LOGO << LPFC_FIP_ELS_ID_SHIFT)
					& LPFC_FIP_ELS_ID_MASK);
		break;
		}
	else
	else
		elsiocb->iocb_flag &= ~LPFC_FIP_ELS;
		elsiocb->iocb_flag &= ~LPFC_FIP_ELS_ID_MASK;


	icmd = &elsiocb->iocb;
	icmd = &elsiocb->iocb;


@@ -591,7 +604,7 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
	} else {
	} else {
		ndlp->nlp_type |= NLP_FABRIC;
		ndlp->nlp_type |= NLP_FABRIC;
		lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE);
		lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE);
		if (vport->vfi_state & LPFC_VFI_REGISTERED) {
		if (vport->vpi_state & LPFC_VPI_REGISTERED) {
			lpfc_start_fdiscs(phba);
			lpfc_start_fdiscs(phba);
			lpfc_do_scr_ns_plogi(phba, vport);
			lpfc_do_scr_ns_plogi(phba, vport);
		} else
		} else
@@ -5401,7 +5414,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
	if (lpfc_els_chk_latt(vport))
	if (lpfc_els_chk_latt(vport))
		goto dropit;
		goto dropit;


	/* Ignore traffic recevied during vport shutdown. */
	/* Ignore traffic received during vport shutdown. */
	if (vport->load_flag & FC_UNLOADING)
	if (vport->load_flag & FC_UNLOADING)
		goto dropit;
		goto dropit;


+5 −3
Original line number Original line Diff line number Diff line
@@ -1798,8 +1798,8 @@ lpfc_mbx_cmpl_reg_vfi(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
		lpfc_vport_set_state(vport, FC_VPORT_FAILED);
		lpfc_vport_set_state(vport, FC_VPORT_FAILED);
		goto fail_free_mem;
		goto fail_free_mem;
	}
	}
	/* Mark the vport has registered with its VFI */
	/* The VPI is implicitly registered when the VFI is registered */
	vport->vfi_state |= LPFC_VFI_REGISTERED;
	vport->vpi_state |= LPFC_VPI_REGISTERED;


	if (vport->port_state == LPFC_FABRIC_CFG_LINK) {
	if (vport->port_state == LPFC_FABRIC_CFG_LINK) {
		lpfc_start_fdiscs(phba);
		lpfc_start_fdiscs(phba);
@@ -2257,6 +2257,7 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
				 mb->mbxStatus);
				 mb->mbxStatus);
		break;
		break;
	}
	}
	vport->vpi_state &= ~LPFC_VPI_REGISTERED;
	vport->unreg_vpi_cmpl = VPORT_OK;
	vport->unreg_vpi_cmpl = VPORT_OK;
	mempool_free(pmb, phba->mbox_mem_pool);
	mempool_free(pmb, phba->mbox_mem_pool);
	/*
	/*
@@ -2314,6 +2315,7 @@ lpfc_mbx_cmpl_reg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
		goto out;
		goto out;
	}
	}


	vport->vpi_state |= LPFC_VPI_REGISTERED;
	vport->num_disc_nodes = 0;
	vport->num_disc_nodes = 0;
	/* go thru NPR list and issue ELS PLOGIs */
	/* go thru NPR list and issue ELS PLOGIs */
	if (vport->fc_npr_cnt)
	if (vport->fc_npr_cnt)
@@ -4464,7 +4466,7 @@ lpfc_unregister_unused_fcf(struct lpfc_hba *phba)
		for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) {
		for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) {
			lpfc_mbx_unreg_vpi(vports[i]);
			lpfc_mbx_unreg_vpi(vports[i]);
			vports[i]->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
			vports[i]->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
			vports[i]->vfi_state &= ~LPFC_VFI_REGISTERED;
			vports[i]->vpi_state &= ~LPFC_VPI_REGISTERED;
		}
		}
	lpfc_destroy_vport_work_array(phba, vports);
	lpfc_destroy_vport_work_array(phba, vports);


+2 −4
Original line number Original line Diff line number Diff line
@@ -2293,8 +2293,7 @@ typedef struct {
	uint32_t rsvd1;
	uint32_t rsvd1;
	uint32_t rsvd2:8;
	uint32_t rsvd2:8;
	uint32_t sid:24;
	uint32_t sid:24;
	uint32_t rsvd3;
	uint32_t wwn[2];
	uint32_t rsvd4;
	uint32_t rsvd5;
	uint32_t rsvd5;
	uint16_t vfi;
	uint16_t vfi;
	uint16_t vpi;
	uint16_t vpi;
@@ -2302,8 +2301,7 @@ typedef struct {
	uint32_t rsvd1;
	uint32_t rsvd1;
	uint32_t sid:24;
	uint32_t sid:24;
	uint32_t rsvd2:8;
	uint32_t rsvd2:8;
	uint32_t rsvd3;
	uint32_t wwn[2];
	uint32_t rsvd4;
	uint32_t rsvd5;
	uint32_t rsvd5;
	uint16_t vpi;
	uint16_t vpi;
	uint16_t vfi;
	uint16_t vfi;
+8 −2
Original line number Original line Diff line number Diff line
@@ -453,6 +453,13 @@ struct lpfc_wqe_generic{
#define lpfc_wqe_gen_wqec_SHIFT		7
#define lpfc_wqe_gen_wqec_SHIFT		7
#define lpfc_wqe_gen_wqec_MASK		0x00000001
#define lpfc_wqe_gen_wqec_MASK		0x00000001
#define lpfc_wqe_gen_wqec_WORD		word11
#define lpfc_wqe_gen_wqec_WORD		word11
#define ELS_ID_FLOGI 3
#define ELS_ID_FDISC 2
#define ELS_ID_LOGO  1
#define ELS_ID_DEFAULT 0
#define lpfc_wqe_gen_els_id_SHIFT	4
#define lpfc_wqe_gen_els_id_MASK	0x00000003
#define lpfc_wqe_gen_els_id_WORD	word11
#define lpfc_wqe_gen_cmd_type_SHIFT	0
#define lpfc_wqe_gen_cmd_type_SHIFT	0
#define lpfc_wqe_gen_cmd_type_MASK	0x0000000F
#define lpfc_wqe_gen_cmd_type_MASK	0x0000000F
#define lpfc_wqe_gen_cmd_type_WORD	word11
#define lpfc_wqe_gen_cmd_type_WORD	word11
@@ -1395,8 +1402,7 @@ struct lpfc_mbx_reg_vfi {
#define lpfc_reg_vfi_fcfi_SHIFT		0
#define lpfc_reg_vfi_fcfi_SHIFT		0
#define lpfc_reg_vfi_fcfi_MASK		0x0000FFFF
#define lpfc_reg_vfi_fcfi_MASK		0x0000FFFF
#define lpfc_reg_vfi_fcfi_WORD		word2
#define lpfc_reg_vfi_fcfi_WORD		word2
	uint32_t word3_rsvd;
	uint32_t wwn[2];
	uint32_t word4_rsvd;
	struct ulp_bde64 bde;
	struct ulp_bde64 bde;
	uint32_t word8_rsvd;
	uint32_t word8_rsvd;
	uint32_t word9_rsvd;
	uint32_t word9_rsvd;
Loading