/* This routine checks whether more Registration State Change Notifications (RSCNs) came in while the discovery state machine was in the FC_RSCN_MODE. If so, the lpfc_els_handle_rscn() routine will be invoked to handle the additional RSCNs for the @vport. Otherwise, the FC_RSCN_MODE bit will be cleared with the @vport to mark as the end of handling the RSCNs.  */
void lpfc_end_rscn(struct lpfc_vport *vport)
/* This routine checks whether more Registration State Change Notifications (RSCNs) came in while the discovery state machine was in the FC_RSCN_MODE. If so, the lpfc_els_handle_rscn() routine will be invoked to handle the additional RSCNs for the @vport. Otherwise, the FC_RSCN_MODE bit will be cleared with the @vport to mark as the end of handling the RSCNs.  */
void lpfc_end_rscn(struct lpfc_vport *vport)
{
	struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
	if (vport->fc_flag & FC_RSCN_MODE) {
		if (vport->fc_rscn_id_cnt ||
		    (vport->fc_flag & FC_RSCN_DISCOVERY) != 0)
			lpfc_els_handle_rscn(vport);
		else {
			spin_lock_irq(shost->host_lock);
			vport->fc_flag &= ~FC_RSCN_MODE;
			spin_unlock_irq(shost->host_lock);
		}
	}
}