diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 6bdeb14878a2..f72fdf23bf1b 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -168,6 +168,19 @@ lpfc_prep_els_iocb(struct lpfc_vport *vport, uint8_t expectRsp, | |||
168 | if (elsiocb == NULL) | 168 | if (elsiocb == NULL) |
169 | return NULL; | 169 | return NULL; |
170 | 170 | ||
171 | /* | ||
172 | * If this command is for fabric controller and HBA running | ||
173 | * in FIP mode send FLOGI, FDISC and LOGO as FIP frames. | ||
174 | */ | ||
175 | if ((did == Fabric_DID) && | ||
176 | bf_get(lpfc_fip_flag, &phba->sli4_hba.sli4_flags) && | ||
177 | ((elscmd == ELS_CMD_FLOGI) || | ||
178 | (elscmd == ELS_CMD_FDISC) || | ||
179 | (elscmd == ELS_CMD_LOGO))) | ||
180 | elsiocb->iocb_flag |= LPFC_FIP_ELS; | ||
181 | else | ||
182 | elsiocb->iocb_flag &= ~LPFC_FIP_ELS; | ||
183 | |||
171 | icmd = &elsiocb->iocb; | 184 | icmd = &elsiocb->iocb; |
172 | 185 | ||
173 | /* fill in BDEs for command */ | 186 | /* fill in BDEs for command */ |
@@ -6108,9 +6121,17 @@ lpfc_issue_els_fdisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
6108 | icmd->un.elsreq64.myID = 0; | 6121 | icmd->un.elsreq64.myID = 0; |
6109 | icmd->un.elsreq64.fl = 1; | 6122 | icmd->un.elsreq64.fl = 1; |
6110 | 6123 | ||
6111 | /* For FDISC, Let FDISC rsp set the NPortID for this VPI */ | 6124 | if (phba->sli_rev == LPFC_SLI_REV4) { |
6112 | icmd->ulpCt_h = 1; | 6125 | /* FDISC needs to be 1 for WQE VPI */ |
6113 | icmd->ulpCt_l = 0; | 6126 | elsiocb->iocb.ulpCt_h = (SLI4_CT_VPI >> 1) & 1; |
6127 | elsiocb->iocb.ulpCt_l = SLI4_CT_VPI & 1 ; | ||
6128 | /* Set the ulpContext to the vpi */ | ||
6129 | elsiocb->iocb.ulpContext = vport->vpi + phba->vpi_base; | ||
6130 | } else { | ||
6131 | /* For FDISC, Let FDISC rsp set the NPortID for this VPI */ | ||
6132 | icmd->ulpCt_h = 1; | ||
6133 | icmd->ulpCt_l = 0; | ||
6134 | } | ||
6114 | 6135 | ||
6115 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); | 6136 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); |
6116 | *((uint32_t *) (pcmd)) = ELS_CMD_FDISC; | 6137 | *((uint32_t *) (pcmd)) = ELS_CMD_FDISC; |