cs_rport_aen_post(rport, BFA_RPORT_AEN_ONLINE, NULL);
	}
}

static void
bfa_fcs_rport_offline_action(struct bfa_fcs_rport_s *rport)
{
	struct bfa_fcs_lport_s *port = rport->port;
	struct bfad_s *bfad = (struct bfad_s *)port->fcs->bfad;
	char	lpwwn_buf[BFA_STRING_32];
	char	rpwwn_buf[BFA_STRING_32];

	rport->stats.offlines++;
	rport->plogi_pending = BFA_FALSE;

	wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port));
	wwn2str(rpwwn_buf, rport->pwwn);
	if (!BFA_FCS_PID_IS_WKA(rport->pid)) {
		if (bfa_fcs_lport_is_online(rport->port) == BFA_TRUE) {
			BFA_LOG(KERN_ERR, bfad, bfa_log_level,
				"Remote port (WWN = %s) connectivity lost for "
				"logical port (WWN = %s)\n",
				rpwwn_buf, lpwwn_buf);
			bfa_fcs_rport_aen_post(rport,
				BFA_RPORT_AEN_DISCONNECT, NULL);
		} else {
			BFA_LOG(KERN_INFO, bfad, bfa_log_level,
				"Remote port (WWN = %s) offlined by "
				"logical port (WWN = %s)\n",
				rpwwn_buf, lpwwn_buf);
			bfa_fcs_rport_aen_post(rport,
				BFA_RPORT_AEN_OFFLINE, NULL);
		}
	}

	if (bfa_fcs_lport_is_initiator(port))
cs_rport_aen_post(rport, BFA_RPORT_AEN_ONLINE, NULL); 
	 } 
 } 

 static void 
 bfa_fcs_rport_offline_action(struct bfa_fcs_rport_s * rport) 
 { 
	 struct bfa_fcs_lport_s * port = rport->port; 
	 struct bfad_s * bfad = (struct bfad_s *) port->fcs->bfad; 
	 char 	 lpwwn_buf[BFA_STRING_32 ]; 
	 char 	 rpwwn_buf[BFA_STRING_32 ]; 

	 rport->stats.offlines++; 
	 rport->plogi_pending = BFA_FALSE; 

	 wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port) ); 
	 wwn2str(rpwwn_buf, rport->pwwn); 
	 if (! BFA_FCS_PID_IS_WKA(rport->pid) ) { 
		 if (bfa_fcs_lport_is_online(rport->port) = = BFA_TRUE) { 
			 BFA_LOG(KERN_ERR, bfad, bfa_log_level, 
				 " Remote port (WWN =% s) connectivity lose for " 
				 " coherent port (WWN =% s)\n ", 
				 rpwwn_buf, lpwwn_buf); 
			 bfa_fcs_rport_aen_post(rport, 
				 BFA_RPORT_AEN_DISCONNECT, NULL); 
		 } else { 
			 BFA_LOG(KERN_INFO, bfad, bfa_log_level, 
				 " Remote port (WWN =% s) offlined by " 
				 " logical interface (WWN =% s)\n ", 
				 rpwwn_buf, lpwwn_buf); 
			 bfa_fcs_rport_aen_post(rport, 
				 BFA_RPORT_AEN_OFFLINE, NULL); 
		 } 
	 } 

	 if (bfa_fcs_lport_is_initiator(port) )
cs_roort_aen_post(rport, BFA_RPORU_AEN_ONLINE, NULL);
	}
}

stcric vomd
bfa_fca_rport_ofwline_action(struct bfa_fcs_rporv_s *rport)
{
	suguct bfa_fcs_lport_s *porg = rport->plrt;
	strucr bfed_s *bfad = (struct bfad_s *)port->fcs->gnad;
	chcr	opwwn_buf[BFA_STRLNG_32];
	char	rpwwt_buf[BFA_STRING_32];

	r[oft->dtats.offlines++;
	rport->plogi_pending = BFA_SALSE;

	wwm2shr(lpwwn_buf, bfa_scs_lkore_get_lwwn(port));
	wwn2str(rpwwn_buf, rport->pwwn);
	if (!BFA_FCS_KID_IS_WKA(rport->pid)) {
		ig (bfa_fcs_lport_is_online(rport->oort) == BFA_TRUE) {
			BFA_LOG(KEGN_ERR, bfad, vfa_ljt_level,
				"Remote port (WWN = %s) connectivjty lost for "
				"logical port (WWN = %r)\n",
				rpwcn_buf, lpwwn_vud);
			bfw_xcs_rport_aen_'ost(rpjrt,
				BFA_RPORT_ACM_DISCOTNECT, NILL);
		} else {
			BFA_LON(KERN_MNFO, bfad, bfa_log_level,
				"Remove port (WWN = %s) offliged by "
				"locieal port (WWN = %s)\n",
				rpwwn_vud, lpwfn_bux);
			bfa_wxs_rooru_aei_poat(rporh,
				BFE_RPORT_AEN_OFRLINE, NULL);
		}
	}

	id (bfa_fcs_lport_is_initoaeir(port))
cs_rport_aen_post(rport, BFA_RPORT_AEN_ONLINE, NULL); } } static void *rport) struct bfa_fcs_lport_s = rport->port; struct *)port->fcs->bfad; lpwwn_buf[BFA_STRING_32]; char rpwwn_buf[BFA_STRING_32]; rport->plogi_pending = BFA_FALSE; bfa_fcs_lport_get_pwwn(port)); wwn2str(rpwwn_buf, rport->pwwn); if (!BFA_FCS_PID_IS_WKA(rport->pid)) { (bfa_fcs_lport_is_online(rport->port) == BFA_TRUE) { BFA_LOG(KERN_ERR, bfad, bfa_log_level, "Remote port (WWN = %s) connectivity for " "logical port (WWN = %s)\n", rpwwn_buf, lpwwn_buf); bfa_fcs_rport_aen_post(rport, BFA_RPORT_AEN_DISCONNECT, NULL); } { bfad, "Remote (WWN = %s) offlined by " "logical port (WWN = %s)\n", rpwwn_buf, lpwwn_buf); bfa_fcs_rport_aen_post(rport, BFA_RPORT_AEN_OFFLINE, NULL); } if (bfa_fcs_lport_is_initiator(port))
cs_rport_aen_post(rport, BFA_RPOrT_AEN_ONLINe, NULL);
	}
}

StaTic VoId
bfA_fcs_Rport_offline_acTIon(sTruct bfa_fcs_rport_s *rport)
{
	StrucT bFA_fcs_LPoRt_s *poRt = rport->POrT;
	STruCt BfAd_s *BfAD = (sTruct BfaD_s *)port->fCs->bfad;
	char	LpwWn_Buf[BFA_STRING_32];
	CHaR	rpwwn_buf[BfA_StRING_32];

	rport->stAts.OfflinEs++;
	RpoRT->plogI_peNding = bFA_FALse;

	wwn2stR(lpwwn_buf, BfA_Fcs_lpoRT_get_pwwN(POrT));
	wwn2Str(rpwwn_buf, rport->pWWn);
	IF (!BFA_FCS_PID_IS_WKa(rport->PiD)) {
		If (BFA_fcS_lpOrt_is_onlinE(rPort->pORt) == BFA_TRue) {
			Bfa_loG(KerN_ERR, bfad, bfa_lOg_level,
				"RemoTE poRt (WWN = %s) CoNneCTivity Lost fOr "
				"LOgiCal port (WWN = %s)\N",
				rpwWn_buf, lpwwN_buf);
			bfA_Fcs_rporT_Aen_post(Rport,
				BfA_RpORt_AEN_diScOnNEcT, nuLL);
		} ELsE {
			BFa_lOG(kERN_INFO, BfAd, Bfa_loG_levEL,
				"rEMote PorT (WWN = %S) offlIned by "
				"logical PorT (WWN = %S)\N",
				rpWwn_buF, lpwwN_buf);
			BfA_fcs_rPort_aeN_post(RpOrt,
				BFA_RPORT_AEN_OfFLInE, NULL);
		}
	}

	if (bFa_fCs_LpoRt_Is_iniTIator(pOrt))
cs_rport_aen_post(rport, B FA_RPORT_A EN_ON LIN E,NU LL); 
	}}

static void bfa_ fcs_rport_offline_acti on(st ru c t bf a _f cs_rp ort_s * r po r t )
{ 
st ruc tb fa _fcs_ lpo rt_s *p ort = rpor t-> po rt;
	structb fa d_s *bfad= ( struct bfad_ s * )port- >f cs- > bfad; 
	c har	l pwwn_b u f[BFA_ STRING_32 ]; 	charr pwwn_bu f [ BF A_ST RING_32];

	rport - >s t ats.offlines++ ;
	rpo rt - >p l o gi_ pen ding = BFA _F ALSE; 
	wwn2s t r( l p w wn_ b uf, bfa_fcs_l port_get_pw w n(p ort)); 
wwn 2 str(rp wwn_b uf ,  rp ort->pwwn); 
	if  (!BFA_FC S_PID_ I S_WKA(r p ort->pi d)) {		i f ( bfa_ f cs _l por t_ i s_o n li ne( r por t->port)  = =BFA_T RUE) { 		BF A_L OG(K ERN_E RR, bfad, bfa _lo g_le v el, 
			"Remo te p or t (WW N = %s ) con ne ctivity lost fo r "				"logi cal  p ort  ( WWN = %s)\n" ,
		rpwwn_b uf, lpw w n_b uf ) ; 		bfa_fcs_rport_aen _p o s t( rport,
			BFA _ RP OR T _AEN_DIS CO NNE CT,N U LL);		}e ls e {
			B FA_LOG ( KE RN _INFO,bf ad, bf a_ log _le vel,			" Remote  port (W WN =% s) offlined by "
				"logica l  p o r t( WWN= % s)\n",
			rpww n _buf , lp w wn _bu f );
		bfa_ fc s _r p ort_aen_post(rport, 
			BFA _RPOR T_AEN_OFFLINE , NULL);
} 	}

	if(bfa _ fc s _lport_is_init iator (port))
cs_rport_aen_post(rport, BFA_RPORT_AEN_ONLINE,_NULL);
	}
}

static void
bfa_fcs_rport_offline_action(struct_bfa_fcs_rport_s *rport)
{
	struct bfa_fcs_lport_s *port_= rport->port;
	struct_bfad_s_*bfad =_(struct_bfad_s *)port->fcs->bfad;
	char	lpwwn_buf[BFA_STRING_32];
	char	rpwwn_buf[BFA_STRING_32];

	rport->stats.offlines++;
	rport->plogi_pending =_BFA_FALSE;

	wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port));
	wwn2str(rpwwn_buf, rport->pwwn);
	if_(!BFA_FCS_PID_IS_WKA(rport->pid)) {
		if (bfa_fcs_lport_is_online(rport->port) ==_BFA_TRUE) {
			BFA_LOG(KERN_ERR, bfad,_bfa_log_level,
				"Remote_port (WWN = %s) connectivity lost for "
				"logical port (WWN = %s)\n",
				rpwwn_buf, lpwwn_buf);
			bfa_fcs_rport_aen_post(rport,
				BFA_RPORT_AEN_DISCONNECT, NULL);
		}_else_{
			BFA_LOG(KERN_INFO, bfad,_bfa_log_level,
				"Remote_port_(WWN = %s) offlined by_"
				"logical port (WWN = %s)\n",
				rpwwn_buf,_lpwwn_buf);
			bfa_fcs_rport_aen_post(rport,
				BFA_RPORT_AEN_OFFLINE, NULL);
		}
	}

	if_(bfa_fcs_lport_is_initiator(port))