[SCSI] lpfc 8.3.26: Fix issues pertaining to SCSI/FC protocol.
Fix issues pertaining to SCSI/FC protocol. - Allow frames destined to 0xFFFFFE to be processed by the driver by matching that DID with the physical port. - Call lpfc_sli_issue_iocb with context1 set to ndlp - In echo command accept function, adjust memcpy to limit memcpy to 1K - Set LPFC_SLI3_BG_ENABLED properly upon completion. - Skip the INIT_VFI call in lpfc_register_fcf if the FCF is already registered and go immediately to initial flogi. - use "status" variable instead of "ret" variable to hold the return of the fc_block_scsi_eh. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
8dce69ff48
commit
bf08611bcc
|
@ -4082,9 +4082,6 @@ lpfc_els_rsp_rnid_acc(struct lpfc_vport *vport, uint8_t format,
|
||||||
|
|
||||||
phba->fc_stat.elsXmitACC++;
|
phba->fc_stat.elsXmitACC++;
|
||||||
elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
|
elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
|
||||||
lpfc_nlp_put(ndlp);
|
|
||||||
elsiocb->context1 = NULL; /* Don't need ndlp for cmpl,
|
|
||||||
* it could be freed */
|
|
||||||
|
|
||||||
rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
|
rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
|
||||||
if (rc == IOCB_ERROR) {
|
if (rc == IOCB_ERROR) {
|
||||||
|
@ -4166,6 +4163,11 @@ lpfc_els_rsp_echo_acc(struct lpfc_vport *vport, uint8_t *data,
|
||||||
psli = &phba->sli;
|
psli = &phba->sli;
|
||||||
cmdsize = oldiocb->iocb.unsli3.rcvsli3.acc_len;
|
cmdsize = oldiocb->iocb.unsli3.rcvsli3.acc_len;
|
||||||
|
|
||||||
|
/* The accumulated length can exceed the BPL_SIZE. For
|
||||||
|
* now, use this as the limit
|
||||||
|
*/
|
||||||
|
if (cmdsize > LPFC_BPL_SIZE)
|
||||||
|
cmdsize = LPFC_BPL_SIZE;
|
||||||
elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp,
|
elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp,
|
||||||
ndlp->nlp_DID, ELS_CMD_ACC);
|
ndlp->nlp_DID, ELS_CMD_ACC);
|
||||||
if (!elsiocb)
|
if (!elsiocb)
|
||||||
|
@ -4189,9 +4191,6 @@ lpfc_els_rsp_echo_acc(struct lpfc_vport *vport, uint8_t *data,
|
||||||
|
|
||||||
phba->fc_stat.elsXmitACC++;
|
phba->fc_stat.elsXmitACC++;
|
||||||
elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
|
elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
|
||||||
lpfc_nlp_put(ndlp);
|
|
||||||
elsiocb->context1 = NULL; /* Don't need ndlp for cmpl,
|
|
||||||
* it could be freed */
|
|
||||||
|
|
||||||
rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
|
rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
|
||||||
if (rc == IOCB_ERROR) {
|
if (rc == IOCB_ERROR) {
|
||||||
|
|
|
@ -1412,7 +1412,7 @@ lpfc_register_fcf(struct lpfc_hba *phba)
|
||||||
if (phba->pport->port_state != LPFC_FLOGI) {
|
if (phba->pport->port_state != LPFC_FLOGI) {
|
||||||
phba->hba_flag |= FCF_RR_INPROG;
|
phba->hba_flag |= FCF_RR_INPROG;
|
||||||
spin_unlock_irq(&phba->hbalock);
|
spin_unlock_irq(&phba->hbalock);
|
||||||
lpfc_issue_init_vfi(phba->pport);
|
lpfc_initial_flogi(phba->pport);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&phba->hbalock);
|
spin_unlock_irq(&phba->hbalock);
|
||||||
|
|
|
@ -3056,8 +3056,9 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
|
||||||
}
|
}
|
||||||
ndlp = rdata->pnode;
|
ndlp = rdata->pnode;
|
||||||
|
|
||||||
if (!(phba->sli3_options & LPFC_SLI3_BG_ENABLED) &&
|
if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) &&
|
||||||
scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) {
|
(!(phba->sli3_options & LPFC_SLI3_BG_ENABLED) ||
|
||||||
|
(phba->sli_rev == LPFC_SLI_REV4))) {
|
||||||
|
|
||||||
lpfc_printf_log(phba, KERN_ERR, LOG_BG,
|
lpfc_printf_log(phba, KERN_ERR, LOG_BG,
|
||||||
"9058 BLKGRD: ERROR: rcvd protected cmd:%02x"
|
"9058 BLKGRD: ERROR: rcvd protected cmd:%02x"
|
||||||
|
@ -3691,9 +3692,9 @@ lpfc_bus_reset_handler(struct scsi_cmnd *cmnd)
|
||||||
fc_host_post_vendor_event(shost, fc_get_event_number(),
|
fc_host_post_vendor_event(shost, fc_get_event_number(),
|
||||||
sizeof(scsi_event), (char *)&scsi_event, LPFC_NL_VENDOR_ID);
|
sizeof(scsi_event), (char *)&scsi_event, LPFC_NL_VENDOR_ID);
|
||||||
|
|
||||||
ret = fc_block_scsi_eh(cmnd);
|
status = fc_block_scsi_eh(cmnd);
|
||||||
if (ret)
|
if (status)
|
||||||
return ret;
|
return status;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Since the driver manages a single bus device, reset all
|
* Since the driver manages a single bus device, reset all
|
||||||
|
|
|
@ -5818,9 +5818,13 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
|
||||||
* then turn off the global config parameters to disable the
|
* then turn off the global config parameters to disable the
|
||||||
* feature in the driver. This is not a fatal error.
|
* feature in the driver. This is not a fatal error.
|
||||||
*/
|
*/
|
||||||
if ((phba->cfg_enable_bg) &&
|
phba->sli3_options &= ~LPFC_SLI3_BG_ENABLED;
|
||||||
!(bf_get(lpfc_mbx_rq_ftr_rsp_dif, &mqe->un.req_ftrs)))
|
if (phba->cfg_enable_bg) {
|
||||||
ftr_rsp++;
|
if (bf_get(lpfc_mbx_rq_ftr_rsp_dif, &mqe->un.req_ftrs))
|
||||||
|
phba->sli3_options |= LPFC_SLI3_BG_ENABLED;
|
||||||
|
else
|
||||||
|
ftr_rsp++;
|
||||||
|
}
|
||||||
|
|
||||||
if (phba->max_vpi && phba->cfg_enable_npiv &&
|
if (phba->max_vpi && phba->cfg_enable_npiv &&
|
||||||
!(bf_get(lpfc_mbx_rq_ftr_rsp_npiv, &mqe->un.req_ftrs)))
|
!(bf_get(lpfc_mbx_rq_ftr_rsp_npiv, &mqe->un.req_ftrs)))
|
||||||
|
@ -13296,7 +13300,8 @@ lpfc_fc_frame_to_vport(struct lpfc_hba *phba, struct fc_frame_header *fc_hdr,
|
||||||
uint32_t did = (fc_hdr->fh_d_id[0] << 16 |
|
uint32_t did = (fc_hdr->fh_d_id[0] << 16 |
|
||||||
fc_hdr->fh_d_id[1] << 8 |
|
fc_hdr->fh_d_id[1] << 8 |
|
||||||
fc_hdr->fh_d_id[2]);
|
fc_hdr->fh_d_id[2]);
|
||||||
|
if (did == Fabric_DID)
|
||||||
|
return phba->pport;
|
||||||
vports = lpfc_create_vport_work_array(phba);
|
vports = lpfc_create_vport_work_array(phba);
|
||||||
if (vports != NULL)
|
if (vports != NULL)
|
||||||
for (i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) {
|
for (i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) {
|
||||||
|
|
Loading…
Reference in a new issue