diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-11-18 15:39:16 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 13:01:50 -0500 |
commit | c868595d5686e97183bc1ad85502835d81d7a457 (patch) | |
tree | c6e1838b96f048147e7b9954a195aee6bfe5b0c0 /drivers/scsi | |
parent | 832151f45806613f203c4c0308c1566d882b971f (diff) |
[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: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 4 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 21 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 8 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw.h | 6 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw4.h | 10 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 4 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 7 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 12 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.h | 3 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_vport.c | 2 |
10 files changed, 56 insertions, 21 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index ebeddbe86e67..2fd3e45c577e 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -290,8 +290,8 @@ struct lpfc_vport { | |||
290 | 290 | ||
291 | uint16_t vpi; | 291 | uint16_t vpi; |
292 | uint16_t vfi; | 292 | uint16_t vfi; |
293 | uint8_t vfi_state; | 293 | uint8_t vpi_state; |
294 | #define LPFC_VFI_REGISTERED 0x1 | 294 | #define LPFC_VPI_REGISTERED 0x1 |
295 | 295 | ||
296 | uint32_t fc_flag; /* FC flags */ | 296 | uint32_t fc_flag; /* FC flags */ |
297 | /* Several of these flags are HBA centric and should be moved to | 297 | /* Several of these flags are HBA centric and should be moved to |
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index fe0a33c9b874..e9e423f28f8a 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -177,9 +177,22 @@ lpfc_prep_els_iocb(struct lpfc_vport *vport, uint8_t expectRsp, | |||
177 | ((elscmd == ELS_CMD_FLOGI) || | 177 | ((elscmd == ELS_CMD_FLOGI) || |
178 | (elscmd == ELS_CMD_FDISC) || | 178 | (elscmd == ELS_CMD_FDISC) || |
179 | (elscmd == ELS_CMD_LOGO))) | 179 | (elscmd == ELS_CMD_LOGO))) |
180 | elsiocb->iocb_flag |= LPFC_FIP_ELS; | 180 | switch (elscmd) { |
181 | case ELS_CMD_FLOGI: | ||
182 | elsiocb->iocb_flag |= ((ELS_ID_FLOGI << LPFC_FIP_ELS_ID_SHIFT) | ||
183 | & LPFC_FIP_ELS_ID_MASK); | ||
184 | break; | ||
185 | case ELS_CMD_FDISC: | ||
186 | elsiocb->iocb_flag |= ((ELS_ID_FDISC << LPFC_FIP_ELS_ID_SHIFT) | ||
187 | & LPFC_FIP_ELS_ID_MASK); | ||
188 | break; | ||
189 | case ELS_CMD_LOGO: | ||
190 | elsiocb->iocb_flag |= ((ELS_ID_LOGO << LPFC_FIP_ELS_ID_SHIFT) | ||
191 | & LPFC_FIP_ELS_ID_MASK); | ||
192 | break; | ||
193 | } | ||
181 | else | 194 | else |
182 | elsiocb->iocb_flag &= ~LPFC_FIP_ELS; | 195 | elsiocb->iocb_flag &= ~LPFC_FIP_ELS_ID_MASK; |
183 | 196 | ||
184 | icmd = &elsiocb->iocb; | 197 | icmd = &elsiocb->iocb; |
185 | 198 | ||
@@ -591,7 +604,7 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
591 | } else { | 604 | } else { |
592 | ndlp->nlp_type |= NLP_FABRIC; | 605 | ndlp->nlp_type |= NLP_FABRIC; |
593 | lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE); | 606 | lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE); |
594 | if (vport->vfi_state & LPFC_VFI_REGISTERED) { | 607 | if (vport->vpi_state & LPFC_VPI_REGISTERED) { |
595 | lpfc_start_fdiscs(phba); | 608 | lpfc_start_fdiscs(phba); |
596 | lpfc_do_scr_ns_plogi(phba, vport); | 609 | lpfc_do_scr_ns_plogi(phba, vport); |
597 | } else | 610 | } else |
@@ -5401,7 +5414,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
5401 | if (lpfc_els_chk_latt(vport)) | 5414 | if (lpfc_els_chk_latt(vport)) |
5402 | goto dropit; | 5415 | goto dropit; |
5403 | 5416 | ||
5404 | /* Ignore traffic recevied during vport shutdown. */ | 5417 | /* Ignore traffic received during vport shutdown. */ |
5405 | if (vport->load_flag & FC_UNLOADING) | 5418 | if (vport->load_flag & FC_UNLOADING) |
5406 | goto dropit; | 5419 | goto dropit; |
5407 | 5420 | ||
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 20fca3f6d43b..3c06aa54a3e5 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -1798,8 +1798,8 @@ lpfc_mbx_cmpl_reg_vfi(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) | |||
1798 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 1798 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
1799 | goto fail_free_mem; | 1799 | goto fail_free_mem; |
1800 | } | 1800 | } |
1801 | /* Mark the vport has registered with its VFI */ | 1801 | /* The VPI is implicitly registered when the VFI is registered */ |
1802 | vport->vfi_state |= LPFC_VFI_REGISTERED; | 1802 | vport->vpi_state |= LPFC_VPI_REGISTERED; |
1803 | 1803 | ||
1804 | if (vport->port_state == LPFC_FABRIC_CFG_LINK) { | 1804 | if (vport->port_state == LPFC_FABRIC_CFG_LINK) { |
1805 | lpfc_start_fdiscs(phba); | 1805 | lpfc_start_fdiscs(phba); |
@@ -2257,6 +2257,7 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
2257 | mb->mbxStatus); | 2257 | mb->mbxStatus); |
2258 | break; | 2258 | break; |
2259 | } | 2259 | } |
2260 | vport->vpi_state &= ~LPFC_VPI_REGISTERED; | ||
2260 | vport->unreg_vpi_cmpl = VPORT_OK; | 2261 | vport->unreg_vpi_cmpl = VPORT_OK; |
2261 | mempool_free(pmb, phba->mbox_mem_pool); | 2262 | mempool_free(pmb, phba->mbox_mem_pool); |
2262 | /* | 2263 | /* |
@@ -2314,6 +2315,7 @@ lpfc_mbx_cmpl_reg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
2314 | goto out; | 2315 | goto out; |
2315 | } | 2316 | } |
2316 | 2317 | ||
2318 | vport->vpi_state |= LPFC_VPI_REGISTERED; | ||
2317 | vport->num_disc_nodes = 0; | 2319 | vport->num_disc_nodes = 0; |
2318 | /* go thru NPR list and issue ELS PLOGIs */ | 2320 | /* go thru NPR list and issue ELS PLOGIs */ |
2319 | if (vport->fc_npr_cnt) | 2321 | if (vport->fc_npr_cnt) |
@@ -4464,7 +4466,7 @@ lpfc_unregister_unused_fcf(struct lpfc_hba *phba) | |||
4464 | for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { | 4466 | for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { |
4465 | lpfc_mbx_unreg_vpi(vports[i]); | 4467 | lpfc_mbx_unreg_vpi(vports[i]); |
4466 | vports[i]->fc_flag |= FC_VPORT_NEEDS_REG_VPI; | 4468 | vports[i]->fc_flag |= FC_VPORT_NEEDS_REG_VPI; |
4467 | vports[i]->vfi_state &= ~LPFC_VFI_REGISTERED; | 4469 | vports[i]->vpi_state &= ~LPFC_VPI_REGISTERED; |
4468 | } | 4470 | } |
4469 | lpfc_destroy_vport_work_array(phba, vports); | 4471 | lpfc_destroy_vport_work_array(phba, vports); |
4470 | 4472 | ||
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index 8274f998ef2f..7070c77357a9 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h | |||
@@ -2293,8 +2293,7 @@ typedef struct { | |||
2293 | uint32_t rsvd1; | 2293 | uint32_t rsvd1; |
2294 | uint32_t rsvd2:8; | 2294 | uint32_t rsvd2:8; |
2295 | uint32_t sid:24; | 2295 | uint32_t sid:24; |
2296 | uint32_t rsvd3; | 2296 | uint32_t wwn[2]; |
2297 | uint32_t rsvd4; | ||
2298 | uint32_t rsvd5; | 2297 | uint32_t rsvd5; |
2299 | uint16_t vfi; | 2298 | uint16_t vfi; |
2300 | uint16_t vpi; | 2299 | uint16_t vpi; |
@@ -2302,8 +2301,7 @@ typedef struct { | |||
2302 | uint32_t rsvd1; | 2301 | uint32_t rsvd1; |
2303 | uint32_t sid:24; | 2302 | uint32_t sid:24; |
2304 | uint32_t rsvd2:8; | 2303 | uint32_t rsvd2:8; |
2305 | uint32_t rsvd3; | 2304 | uint32_t wwn[2]; |
2306 | uint32_t rsvd4; | ||
2307 | uint32_t rsvd5; | 2305 | uint32_t rsvd5; |
2308 | uint16_t vpi; | 2306 | uint16_t vpi; |
2309 | uint16_t vfi; | 2307 | uint16_t vfi; |
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 4f03f1d876d0..95f8b4e0063d 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h | |||
@@ -453,6 +453,13 @@ struct lpfc_wqe_generic{ | |||
453 | #define lpfc_wqe_gen_wqec_SHIFT 7 | 453 | #define lpfc_wqe_gen_wqec_SHIFT 7 |
454 | #define lpfc_wqe_gen_wqec_MASK 0x00000001 | 454 | #define lpfc_wqe_gen_wqec_MASK 0x00000001 |
455 | #define lpfc_wqe_gen_wqec_WORD word11 | 455 | #define lpfc_wqe_gen_wqec_WORD word11 |
456 | #define ELS_ID_FLOGI 3 | ||
457 | #define ELS_ID_FDISC 2 | ||
458 | #define ELS_ID_LOGO 1 | ||
459 | #define ELS_ID_DEFAULT 0 | ||
460 | #define lpfc_wqe_gen_els_id_SHIFT 4 | ||
461 | #define lpfc_wqe_gen_els_id_MASK 0x00000003 | ||
462 | #define lpfc_wqe_gen_els_id_WORD word11 | ||
456 | #define lpfc_wqe_gen_cmd_type_SHIFT 0 | 463 | #define lpfc_wqe_gen_cmd_type_SHIFT 0 |
457 | #define lpfc_wqe_gen_cmd_type_MASK 0x0000000F | 464 | #define lpfc_wqe_gen_cmd_type_MASK 0x0000000F |
458 | #define lpfc_wqe_gen_cmd_type_WORD word11 | 465 | #define lpfc_wqe_gen_cmd_type_WORD word11 |
@@ -1395,8 +1402,7 @@ struct lpfc_mbx_reg_vfi { | |||
1395 | #define lpfc_reg_vfi_fcfi_SHIFT 0 | 1402 | #define lpfc_reg_vfi_fcfi_SHIFT 0 |
1396 | #define lpfc_reg_vfi_fcfi_MASK 0x0000FFFF | 1403 | #define lpfc_reg_vfi_fcfi_MASK 0x0000FFFF |
1397 | #define lpfc_reg_vfi_fcfi_WORD word2 | 1404 | #define lpfc_reg_vfi_fcfi_WORD word2 |
1398 | uint32_t word3_rsvd; | 1405 | uint32_t wwn[2]; |
1399 | uint32_t word4_rsvd; | ||
1400 | struct ulp_bde64 bde; | 1406 | struct ulp_bde64 bde; |
1401 | uint32_t word8_rsvd; | 1407 | uint32_t word8_rsvd; |
1402 | uint32_t word9_rsvd; | 1408 | uint32_t word9_rsvd; |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index d7385d258f78..02268a1eec69 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -2229,7 +2229,7 @@ lpfc_offline_prep(struct lpfc_hba * phba) | |||
2229 | 2229 | ||
2230 | if (vports[i]->load_flag & FC_UNLOADING) | 2230 | if (vports[i]->load_flag & FC_UNLOADING) |
2231 | continue; | 2231 | continue; |
2232 | vports[i]->vfi_state &= ~LPFC_VFI_REGISTERED; | 2232 | vports[i]->vpi_state &= ~LPFC_VPI_REGISTERED; |
2233 | shost = lpfc_shost_from_vport(vports[i]); | 2233 | shost = lpfc_shost_from_vport(vports[i]); |
2234 | list_for_each_entry_safe(ndlp, next_ndlp, | 2234 | list_for_each_entry_safe(ndlp, next_ndlp, |
2235 | &vports[i]->fc_nodes, | 2235 | &vports[i]->fc_nodes, |
@@ -3047,7 +3047,7 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba, | |||
3047 | "2718 Clear Virtual Link Received for VPI 0x%x" | 3047 | "2718 Clear Virtual Link Received for VPI 0x%x" |
3048 | " tag 0x%x\n", acqe_fcoe->index, acqe_fcoe->event_tag); | 3048 | " tag 0x%x\n", acqe_fcoe->index, acqe_fcoe->event_tag); |
3049 | vport = lpfc_find_vport_by_vpid(phba, | 3049 | vport = lpfc_find_vport_by_vpid(phba, |
3050 | acqe_fcoe->index /*- phba->vpi_base*/); | 3050 | acqe_fcoe->index - phba->vpi_base); |
3051 | if (!vport) | 3051 | if (!vport) |
3052 | break; | 3052 | break; |
3053 | ndlp = lpfc_findnode_did(vport, Fabric_DID); | 3053 | ndlp = lpfc_findnode_did(vport, Fabric_DID); |
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 51c9a1f576f6..a9afd8b94b6a 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
@@ -820,6 +820,10 @@ lpfc_reg_vpi(struct lpfc_vport *vport, LPFC_MBOXQ_t *pmb) | |||
820 | mb->un.varRegVpi.vpi = vport->vpi + vport->phba->vpi_base; | 820 | mb->un.varRegVpi.vpi = vport->vpi + vport->phba->vpi_base; |
821 | mb->un.varRegVpi.sid = vport->fc_myDID; | 821 | mb->un.varRegVpi.sid = vport->fc_myDID; |
822 | mb->un.varRegVpi.vfi = vport->vfi + vport->phba->vfi_base; | 822 | mb->un.varRegVpi.vfi = vport->vfi + vport->phba->vfi_base; |
823 | memcpy(mb->un.varRegVpi.wwn, &vport->fc_portname, | ||
824 | sizeof(struct lpfc_name)); | ||
825 | mb->un.varRegVpi.wwn[0] = cpu_to_le32(mb->un.varRegVpi.wwn[0]); | ||
826 | mb->un.varRegVpi.wwn[1] = cpu_to_le32(mb->un.varRegVpi.wwn[1]); | ||
823 | 827 | ||
824 | mb->mbxCommand = MBX_REG_VPI; | 828 | mb->mbxCommand = MBX_REG_VPI; |
825 | mb->mbxOwner = OWN_HOST; | 829 | mb->mbxOwner = OWN_HOST; |
@@ -1818,6 +1822,9 @@ lpfc_reg_vfi(struct lpfcMboxq *mbox, struct lpfc_vport *vport, dma_addr_t phys) | |||
1818 | bf_set(lpfc_reg_vfi_vfi, reg_vfi, vport->vfi + vport->phba->vfi_base); | 1822 | bf_set(lpfc_reg_vfi_vfi, reg_vfi, vport->vfi + vport->phba->vfi_base); |
1819 | bf_set(lpfc_reg_vfi_fcfi, reg_vfi, vport->phba->fcf.fcfi); | 1823 | bf_set(lpfc_reg_vfi_fcfi, reg_vfi, vport->phba->fcf.fcfi); |
1820 | bf_set(lpfc_reg_vfi_vpi, reg_vfi, vport->vpi + vport->phba->vpi_base); | 1824 | bf_set(lpfc_reg_vfi_vpi, reg_vfi, vport->vpi + vport->phba->vpi_base); |
1825 | memcpy(reg_vfi->wwn, &vport->fc_portname, sizeof(struct lpfc_name)); | ||
1826 | reg_vfi->wwn[0] = cpu_to_le32(reg_vfi->wwn[0]); | ||
1827 | reg_vfi->wwn[1] = cpu_to_le32(reg_vfi->wwn[1]); | ||
1821 | reg_vfi->bde.addrHigh = putPaddrHigh(phys); | 1828 | reg_vfi->bde.addrHigh = putPaddrHigh(phys); |
1822 | reg_vfi->bde.addrLow = putPaddrLow(phys); | 1829 | reg_vfi->bde.addrLow = putPaddrLow(phys); |
1823 | reg_vfi->bde.tus.f.bdeSize = sizeof(vport->fc_sparam); | 1830 | reg_vfi->bde.tus.f.bdeSize = sizeof(vport->fc_sparam); |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index c4b19d094d39..ce0a1a1c4792 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -5756,12 +5756,13 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
5756 | uint8_t cmnd; | 5756 | uint8_t cmnd; |
5757 | uint16_t xritag; | 5757 | uint16_t xritag; |
5758 | struct ulp_bde64 *bpl = NULL; | 5758 | struct ulp_bde64 *bpl = NULL; |
5759 | uint32_t els_id = ELS_ID_DEFAULT; | ||
5759 | 5760 | ||
5760 | fip = phba->hba_flag & HBA_FIP_SUPPORT; | 5761 | fip = phba->hba_flag & HBA_FIP_SUPPORT; |
5761 | /* The fcp commands will set command type */ | 5762 | /* The fcp commands will set command type */ |
5762 | if (iocbq->iocb_flag & LPFC_IO_FCP) | 5763 | if (iocbq->iocb_flag & LPFC_IO_FCP) |
5763 | command_type = FCP_COMMAND; | 5764 | command_type = FCP_COMMAND; |
5764 | else if (fip && (iocbq->iocb_flag & LPFC_FIP_ELS)) | 5765 | else if (fip && (iocbq->iocb_flag & LPFC_FIP_ELS_ID_MASK)) |
5765 | command_type = ELS_COMMAND_FIP; | 5766 | command_type = ELS_COMMAND_FIP; |
5766 | else | 5767 | else |
5767 | command_type = ELS_COMMAND_NON_FIP; | 5768 | command_type = ELS_COMMAND_NON_FIP; |
@@ -5822,6 +5823,13 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
5822 | bf_set(lpfc_wqe_gen_ct, &wqe->generic, ct); | 5823 | bf_set(lpfc_wqe_gen_ct, &wqe->generic, ct); |
5823 | bf_set(lpfc_wqe_gen_pu, &wqe->generic, 0); | 5824 | bf_set(lpfc_wqe_gen_pu, &wqe->generic, 0); |
5824 | /* CCP CCPE PV PRI in word10 were set in the memcpy */ | 5825 | /* CCP CCPE PV PRI in word10 were set in the memcpy */ |
5826 | |||
5827 | if (command_type == ELS_COMMAND_FIP) { | ||
5828 | els_id = ((iocbq->iocb_flag & LPFC_FIP_ELS_ID_MASK) | ||
5829 | >> LPFC_FIP_ELS_ID_SHIFT); | ||
5830 | } | ||
5831 | bf_set(lpfc_wqe_gen_els_id, &wqe->generic, els_id); | ||
5832 | |||
5825 | break; | 5833 | break; |
5826 | case CMD_XMIT_SEQUENCE64_CR: | 5834 | case CMD_XMIT_SEQUENCE64_CR: |
5827 | /* word3 iocb=io_tag32 wqe=payload_offset */ | 5835 | /* word3 iocb=io_tag32 wqe=payload_offset */ |
@@ -11282,7 +11290,7 @@ lpfc_sli4_handle_received_buffer(struct lpfc_hba *phba, | |||
11282 | } | 11290 | } |
11283 | fcfi = bf_get(lpfc_rcqe_fcf_id, &dmabuf->cq_event.cqe.rcqe_cmpl); | 11291 | fcfi = bf_get(lpfc_rcqe_fcf_id, &dmabuf->cq_event.cqe.rcqe_cmpl); |
11284 | vport = lpfc_fc_frame_to_vport(phba, fc_hdr, fcfi); | 11292 | vport = lpfc_fc_frame_to_vport(phba, fc_hdr, fcfi); |
11285 | if (!vport) { | 11293 | if (!vport || !(vport->vpi_state & LPFC_VPI_REGISTERED)) { |
11286 | /* throw out the frame */ | 11294 | /* throw out the frame */ |
11287 | lpfc_in_buf_free(phba, &dmabuf->dbuf); | 11295 | lpfc_in_buf_free(phba, &dmabuf->dbuf); |
11288 | return; | 11296 | return; |
diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h index 7b12663909a7..174dcda32195 100644 --- a/drivers/scsi/lpfc/lpfc_sli.h +++ b/drivers/scsi/lpfc/lpfc_sli.h | |||
@@ -60,7 +60,8 @@ struct lpfc_iocbq { | |||
60 | #define LPFC_DRIVER_ABORTED 8 /* driver aborted this request */ | 60 | #define LPFC_DRIVER_ABORTED 8 /* driver aborted this request */ |
61 | #define LPFC_IO_FABRIC 0x10 /* Iocb send using fabric scheduler */ | 61 | #define LPFC_IO_FABRIC 0x10 /* Iocb send using fabric scheduler */ |
62 | #define LPFC_DELAY_MEM_FREE 0x20 /* Defer free'ing of FC data */ | 62 | #define LPFC_DELAY_MEM_FREE 0x20 /* Defer free'ing of FC data */ |
63 | #define LPFC_FIP_ELS 0x40 | 63 | #define LPFC_FIP_ELS_ID_MASK 0xc0 /* ELS_ID range 0-3 */ |
64 | #define LPFC_FIP_ELS_ID_SHIFT 6 | ||
64 | 65 | ||
65 | uint8_t abort_count; | 66 | uint8_t abort_count; |
66 | uint8_t rsvd2; | 67 | uint8_t rsvd2; |
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index 606efa767548..096d178c4c86 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c | |||
@@ -389,7 +389,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) | |||
389 | * by the port. | 389 | * by the port. |
390 | */ | 390 | */ |
391 | if ((phba->sli_rev == LPFC_SLI_REV4) && | 391 | if ((phba->sli_rev == LPFC_SLI_REV4) && |
392 | (pport->vfi_state & LPFC_VFI_REGISTERED)) { | 392 | (pport->vpi_state & LPFC_VPI_REGISTERED)) { |
393 | rc = lpfc_sli4_init_vpi(phba, vpi); | 393 | rc = lpfc_sli4_init_vpi(phba, vpi); |
394 | if (rc) { | 394 | if (rc) { |
395 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 395 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, |