mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 04:20:54 +07:00
lpfc: Check for active portpeerbeacon.
LCB requests to set Beacon would fail if the beacon was already enabled internally as the mailbox command used to query the state failes with an already-set status. Correct by enhancing the check so we don't fail if if the already set status comes back. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
This commit is contained in:
parent
641c43cc69
commit
481ad96799
@ -5044,25 +5044,36 @@ lpfc_els_lcb_rsp(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
|||||||
struct lpfc_iocbq *elsiocb;
|
struct lpfc_iocbq *elsiocb;
|
||||||
struct lpfc_nodelist *ndlp;
|
struct lpfc_nodelist *ndlp;
|
||||||
struct ls_rjt *stat;
|
struct ls_rjt *stat;
|
||||||
|
union lpfc_sli4_cfg_shdr *shdr;
|
||||||
struct lpfc_lcb_context *lcb_context;
|
struct lpfc_lcb_context *lcb_context;
|
||||||
struct fc_lcb_res_frame *lcb_res;
|
struct fc_lcb_res_frame *lcb_res;
|
||||||
uint32_t cmdsize;
|
uint32_t cmdsize, shdr_status, shdr_add_status;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
mb = &pmb->u.mb;
|
mb = &pmb->u.mb;
|
||||||
|
|
||||||
lcb_context = (struct lpfc_lcb_context *)pmb->context1;
|
lcb_context = (struct lpfc_lcb_context *)pmb->context1;
|
||||||
ndlp = lcb_context->ndlp;
|
ndlp = lcb_context->ndlp;
|
||||||
pmb->context1 = NULL;
|
pmb->context1 = NULL;
|
||||||
pmb->context2 = NULL;
|
pmb->context2 = NULL;
|
||||||
|
|
||||||
if (mb->mbxStatus) {
|
shdr = (union lpfc_sli4_cfg_shdr *)
|
||||||
|
&pmb->u.mqe.un.beacon_config.header.cfg_shdr;
|
||||||
|
shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response);
|
||||||
|
shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response);
|
||||||
|
|
||||||
|
lpfc_printf_log(phba, KERN_INFO, LOG_MBOX,
|
||||||
|
"0194 SET_BEACON_CONFIG mailbox "
|
||||||
|
"completed with status x%x add_status x%x,"
|
||||||
|
" mbx status x%x\n",
|
||||||
|
shdr_status, shdr_add_status, mb->mbxStatus);
|
||||||
|
|
||||||
|
if (mb->mbxStatus && !(shdr_status &&
|
||||||
|
shdr_add_status == ADD_STATUS_OPERATION_ALREADY_ACTIVE)) {
|
||||||
mempool_free(pmb, phba->mbox_mem_pool);
|
mempool_free(pmb, phba->mbox_mem_pool);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
mempool_free(pmb, phba->mbox_mem_pool);
|
mempool_free(pmb, phba->mbox_mem_pool);
|
||||||
|
|
||||||
cmdsize = sizeof(struct fc_lcb_res_frame);
|
cmdsize = sizeof(struct fc_lcb_res_frame);
|
||||||
elsiocb = lpfc_prep_els_iocb(phba->pport, 0, cmdsize,
|
elsiocb = lpfc_prep_els_iocb(phba->pport, 0, cmdsize,
|
||||||
lpfc_max_els_tries, ndlp,
|
lpfc_max_els_tries, ndlp,
|
||||||
|
@ -1943,6 +1943,12 @@ struct lpfc_mbx_redisc_fcf_tbl {
|
|||||||
#define STATUS_FCF_IN_USE 0x3a
|
#define STATUS_FCF_IN_USE 0x3a
|
||||||
#define STATUS_FCF_TABLE_EMPTY 0x43
|
#define STATUS_FCF_TABLE_EMPTY 0x43
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Additional status field for embedded SLI_CONFIG mailbox
|
||||||
|
* command.
|
||||||
|
*/
|
||||||
|
#define ADD_STATUS_OPERATION_ALREADY_ACTIVE 0x67
|
||||||
|
|
||||||
struct lpfc_mbx_sli4_config {
|
struct lpfc_mbx_sli4_config {
|
||||||
struct mbox_header header;
|
struct mbox_header header;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user