@@ -169,13 +169,13 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport)
169169
170170 lpfc_printf_vlog (ndlp -> vport , KERN_INFO , LOG_NODE ,
171171 "3181 dev_loss_callbk x%06x, rport x%px flg x%x "
172- "load_flag x%x refcnt %u state %d xpt x%x\n" ,
172+ "load_flag x%lx refcnt %u state %d xpt x%x\n" ,
173173 ndlp -> nlp_DID , ndlp -> rport , ndlp -> nlp_flag ,
174174 vport -> load_flag , kref_read (& ndlp -> kref ),
175175 ndlp -> nlp_state , ndlp -> fc4_xpt_flags );
176176
177177 /* Don't schedule a worker thread event if the vport is going down. */
178- if (vport -> load_flag & FC_UNLOADING ) {
178+ if (test_bit ( FC_UNLOADING , & vport -> load_flag ) ) {
179179 spin_lock_irqsave (& ndlp -> lock , iflags );
180180 ndlp -> rport = NULL ;
181181
@@ -263,7 +263,7 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport)
263263 } else {
264264 lpfc_printf_vlog (ndlp -> vport , KERN_INFO , LOG_NODE ,
265265 "3188 worker thread is stopped %s x%06x, "
266- " rport x%px flg x%x load_flag x%x refcnt "
266+ " rport x%px flg x%x load_flag x%lx refcnt "
267267 "%d\n" , __func__ , ndlp -> nlp_DID ,
268268 ndlp -> rport , ndlp -> nlp_flag ,
269269 vport -> load_flag , kref_read (& ndlp -> kref ));
@@ -911,7 +911,7 @@ lpfc_work_list_done(struct lpfc_hba *phba)
911911 free_evt = 0 ;
912912 break ;
913913 case LPFC_EVT_RESET_HBA :
914- if (!( phba -> pport -> load_flag & FC_UNLOADING ))
914+ if (!test_bit ( FC_UNLOADING , & phba -> pport -> load_flag ))
915915 lpfc_reset_hba (phba );
916916 break ;
917917 }
@@ -1358,7 +1358,7 @@ lpfc_linkup_port(struct lpfc_vport *vport)
13581358 struct Scsi_Host * shost = lpfc_shost_from_vport (vport );
13591359 struct lpfc_hba * phba = vport -> phba ;
13601360
1361- if (( vport -> load_flag & FC_UNLOADING ) != 0 )
1361+ if (test_bit ( FC_UNLOADING , & vport -> load_flag ) )
13621362 return ;
13631363
13641364 lpfc_debugfs_disc_trc (vport , LPFC_DISC_TRC_ELS_CMD ,
@@ -3924,7 +3924,7 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
39243924 lpfc_printf_vlog (vport , KERN_ERR , LOG_TRACE_EVENT ,
39253925 "2798 Unreg_vpi failed vpi 0x%x, mb status = 0x%x\n" ,
39263926 vport -> vpi , mb -> mbxStatus );
3927- if (!( phba -> pport -> load_flag & FC_UNLOADING ))
3927+ if (!test_bit ( FC_UNLOADING , & phba -> pport -> load_flag ))
39283928 lpfc_workq_post_event (phba , NULL , NULL ,
39293929 LPFC_EVT_RESET_HBA );
39303930 }
@@ -3939,7 +3939,7 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
39393939 * This shost reference might have been taken at the beginning of
39403940 * lpfc_vport_delete()
39413941 */
3942- if (( vport -> load_flag & FC_UNLOADING ) && ( vport != phba -> pport ) )
3942+ if (test_bit ( FC_UNLOADING , & vport -> load_flag ) && vport != phba -> pport )
39433943 scsi_host_put (shost );
39443944}
39453945
@@ -4490,7 +4490,7 @@ lpfc_register_remote_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
44904490 ndlp -> nlp_DID , ndlp -> nlp_flag , ndlp -> nlp_type );
44914491
44924492 /* Don't add the remote port if unloading. */
4493- if (vport -> load_flag & FC_UNLOADING )
4493+ if (test_bit ( FC_UNLOADING , & vport -> load_flag ) )
44944494 return ;
44954495
44964496 ndlp -> rport = rport = fc_remote_port_add (shost , 0 , & rport_ids );
@@ -5235,13 +5235,13 @@ lpfc_set_unreg_login_mbx_cmpl(struct lpfc_hba *phba, struct lpfc_vport *vport,
52355235 mbox -> mbox_cmpl = lpfc_nlp_logo_unreg ;
52365236
52375237 } else if (phba -> sli_rev == LPFC_SLI_REV4 &&
5238- (!( vport -> load_flag & FC_UNLOADING ) ) &&
5238+ ! test_bit ( FC_UNLOADING , & vport -> load_flag ) &&
52395239 (bf_get (lpfc_sli_intf_if_type , & phba -> sli4_hba .sli_intf ) >=
52405240 LPFC_SLI_INTF_IF_TYPE_2 ) &&
52415241 (kref_read (& ndlp -> kref ) > 0 )) {
52425242 mbox -> mbox_cmpl = lpfc_sli4_unreg_rpi_cmpl_clr ;
52435243 } else {
5244- if (vport -> load_flag & FC_UNLOADING ) {
5244+ if (test_bit ( FC_UNLOADING , & vport -> load_flag ) ) {
52455245 if (phba -> sli_rev == LPFC_SLI_REV4 ) {
52465246 spin_lock_irqsave (& ndlp -> lock , iflags );
52475247 ndlp -> nlp_flag |= NLP_RELEASE_RPI ;
@@ -5349,7 +5349,7 @@ lpfc_unreg_rpi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
53495349 * will issue a LOGO here and keep the rpi alive if
53505350 * not unloading.
53515351 */
5352- if (!( vport -> load_flag & FC_UNLOADING )) {
5352+ if (!test_bit ( FC_UNLOADING , & vport -> load_flag )) {
53535353 ndlp -> nlp_flag &= ~NLP_UNREG_INP ;
53545354 lpfc_issue_els_logo (vport , ndlp , 0 );
53555355 ndlp -> nlp_prev_state = ndlp -> nlp_state ;
@@ -6925,8 +6925,8 @@ lpfc_unregister_fcf_rescan(struct lpfc_hba *phba)
69256925 * If driver is not unloading, check if there is any other
69266926 * FCF record that can be used for discovery.
69276927 */
6928- if (( phba -> pport -> load_flag & FC_UNLOADING ) ||
6929- ( phba -> link_state < LPFC_LINK_UP ) )
6928+ if (test_bit ( FC_UNLOADING , & phba -> pport -> load_flag ) ||
6929+ phba -> link_state < LPFC_LINK_UP )
69306930 return ;
69316931
69326932 /* This is considered as the initial FCF discovery scan */
0 commit comments