lpfc 8.1.11 : Discovery Fixes
Subsystems (2)
PATCH 1/9 lpfc 8.1.11 : Discovery Fixes
Discovery Fixes:
- Prevent starting discovery of a node if discovery is in progress.
- Code improvement (reduction) for lpfc_findnode_did().
- Update discovery to send RFF to Fabric on link up
- Bypass unique WWN checks for fabric addresses
- Add ndlp to plogi list prior to issuing the plogi els command
Signed-off-by James Smart <[email protected]>
drivers/scsi/lpfc/lpfc_ct.c +23 -1
@@ -558,6 +558,14 @@ lpfc_cmpl_ct_cmd_rsnn_nn(struct lpfc_hbareturn ; } +static void +lpfc_cmpl_ct_cmd_rff_id (struct lpfc_hba * phba,struct lpfc_iocbq * cmdiocb, +struct lpfc_iocbq * rspiocb) +{ +lpfc_cmpl_ct_cmd_rft_id (phba, cmdiocb, rspiocb); +return ; +} +void lpfc_get_hba_sym_node_name (struct lpfc_hba * phba,uint8_t * symbp) {
@@ -629,6 +637,8 @@ lpfc_ns_cmd(struct lpfc_hba * phba, stru bpl->tus.f.bdeSize =RNN_REQUEST_SZ ; else if (cmdcode == SLI_CTNS_RSNN_NN) bpl->tus.f.bdeSize = RSNN_REQUEST_SZ; + else if (cmdcode == SLI_CTNS_RFF_ID) + bpl->tus.f.bdeSize = RFF_REQUEST_SZ; else bpl->tus.f.bdeSize = 0; bpl->tus.w =le32_to_cpu (bpl->tus.w);
@@ -660,6 +670,17 @@ lpfc_ns_cmd(struct lpfc_hba * phba, stru cmpl = lpfc_cmpl_ct_cmd_rft_id;break ; +case SLI_CTNS_RFF_ID : + CtReq->CommandResponse.bits.CmdRsp = +be16_to_cpu (SLI_CTNS_RFF_ID ); + CtReq->un.rff.PortId =be32_to_cpu (phba->fc_myDID); + CtReq->un.rff.feature_res =0 ; + CtReq->un.rff.feature_tgt =0 ; + CtReq->un.rff.type_code =FC_FCP_DATA ; + CtReq->un.rff.feature_init =1 ; + cmpl = lpfc_cmpl_ct_cmd_rff_id; +break ; +case SLI_CTNS_RNN_ID : CtReq->CommandResponse.bits.CmdRsp =be16_to_cpu (SLI_CTNS_RNN_ID );
@@ -934,7 +955,8 @@ lpfc_fdmi_cmd(struct lpfc_hba * phba, st ae = (ATTRIBUTE_ENTRY *) ((uint8_t *) rh + size); ae->ad.bits.AttrType =be16_to_cpu (OS_NAME_VERSION );sprintf (ae->un.OsNameVersion,"%s %s %s" , -init_utsname ()->sysname,init_utsname ()->release, +init_utsname ()->sysname, +init_utsname ()->release,init_utsname ()->version); len =strlen (ae->un.OsNameVersion); len += (len &3 ) ? (4 - (len &3 )) :4 ;
drivers/scsi/lpfc/lpfc_els.c +7 -0
@@ -657,6 +657,12 @@ lpfc_plogi_confirm_nport(struct lpfc_hbauint8_t name[sizeof (struct lpfc_name )];uint32_t rc; +/* Fabric nodes can have the same WWPN so we don't bother searching +* by WWPN. Just return the ndlp that was given to us. +*/ +if (ndlp->nlp_type &NLP_FABRIC ) +return ndlp; + lp = (uint32_t *) prsp->virt; sp = (struct serv_parm *) ((uint8_t *) lp +sizeof (uint32_t ));memset (name,0 ,sizeof (struct lpfc_name ));
@@ -2644,6 +2650,7 @@ lpfc_els_handle_rscn(struct lpfc_hba * p ndlp->nlp_type |=NLP_FABRIC ; ndlp->nlp_prev_state = ndlp->nlp_state; ndlp->nlp_state =NLP_STE_PLOGI_ISSUE ; +lpfc_nlp_list (phba, ndlp,NLP_PLOGI_LIST );lpfc_issue_els_plogi (phba, NameServer_DID,0 );/* Wait for NameServer login cmpl before we can continue */
drivers/scsi/lpfc/lpfc_hbadisc.c +25 -172
229 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_hw.h +16 -0
@@ -121,6 +121,20 @@ struct lpfc_sli_ct_request {uint32_t rsvd[7 ]; } rft; +struct rff { +uint32_t PortId; +uint8_t reserved[2 ]; +#ifdef __BIG_ENDIAN_BITFIELD +uint8_t feature_res:6 ; +uint8_t feature_init:1 ; +uint8_t feature_tgt:1 ; +#else /* __LITTLE_ENDIAN_BITFIELD */ +uint8_t feature_tgt:1 ; +uint8_t feature_init:1 ; +uint8_t feature_res:6 ; +#endif +uint8_t type_code;/* type=8 for FCP */ + } rff;struct rnn {uint32_t PortId;/* For RNN_ID requests */ uint8_t wwnn[8 ];
@@ -136,6 +150,7 @@ struct lpfc_sli_ct_request {#define SLI_CT_REVISION 1#define GID_REQUEST_SZ (sizeof(struct lpfc_sli_ct_request) - 260)#define RFT_REQUEST_SZ (sizeof(struct lpfc_sli_ct_request) - 228) +#define RFF_REQUEST_SZ (sizeof(struct lpfc_sli_ct_request) - 235)#define RNN_REQUEST_SZ (sizeof(struct lpfc_sli_ct_request) - 252)#define RSNN_REQUEST_SZ (sizeof(struct lpfc_sli_ct_request))
@@ -225,6 +240,7 @@ struct lpfc_sli_ct_request {#define SLI_CTNS_RNN_ID 0x0213#define SLI_CTNS_RCS_ID 0x0214#define SLI_CTNS_RFT_ID 0x0217 +#define SLI_CTNS_RFF_ID 0x021F#define SLI_CTNS_RSPN_ID 0x0218#define SLI_CTNS_RPT_ID 0x021A#define SLI_CTNS_RIP_NN 0x0235
drivers/scsi/lpfc/lpfc_nportdisc.c +2 -2
@@ -1620,8 +1620,8 @@ lpfc_rcv_padisc_npr_node(struct lpfc_hba* or discovery in progress for this node. Starting discovery * here will affect the counting of discovery threads. */ -if ((!(ndlp->nlp_flag &NLP_DELAY_TMO )) && - (ndlp->nlp_flag &NLP_NPR_2B_DISC )){ +if (!(ndlp->nlp_flag &NLP_DELAY_TMO ) && + !(ndlp->nlp_flag &NLP_NPR_2B_DISC )){if (ndlp->nlp_flag &NLP_NPR_ADISC ) { ndlp->nlp_prev_state =NLP_STE_NPR_NODE ; ndlp->nlp_state =NLP_STE_ADISC_ISSUE ;