tmpl.els_cmd.els_code = FC_ELS_RRQ;

	/*
	 * fcp_struct fchs_s mpl
	 */
	fcp_fchs_tmpl.routing = FC_RTG_FC4_DEV_DATA;
	fcp_fchs_tmpl.cat_info = FC_CAT_UNSOLICIT_CMD;
	fcp_fchs_tmpl.type = FC_TYPE_FCP;
	fcp_fchs_tmpl.f_ctl =
		bfa_hton3b(FCTL_FS_EXCH | FCTL_END_SEQ | FCTL_SI_XFER);
	fcp_fchs_tmpl.seq_id = 1;
	fcp_fchs_tmpl.rx_id = FC_RXID_ANY;
}

static void
fc_gs_fchdr_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u32 ox_id)
{
	memset(fchs, 0, sizeof(struct fchs_s));

	fchs->routing = FC_RTG_FC4_DEV_DATA;
	fchs->cat_info = FC_CAT_UNSOLICIT_CTRL;
	fchs->type = FC_TYPE_SERVICES;
	fchs->f_ctl =
		bfa_hton3b(FCTL_SEQ_INI | FCTL_FS_EXCH | FCTL_END_SEQ |
			      FCTL_SI_XFER);
	fchs->rx_id = FC_RXID_ANY;
	fchs->d_id = (d_id);
	fchs->s_id = (s_id);
	fchs->ox_id = cpu_to_be16(ox_id);

	/*
	 * @todo no need to set ox_id for request
	 *       no need to set rx_id for response
	 */
}

static void
fc_gsresp_fchdr_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id)
{
	memset(fchs
tmpl.els_cmd.els_code = FC_ELS_RRQ; 

	 / * 
	  * fcp_struct fchs_s mpl 
	  * / 
	 fcp_fchs_tmpl.routing = FC_RTG_FC4_DEV_DATA; 
	 fcp_fchs_tmpl.cat_info = FC_CAT_UNSOLICIT_CMD; 
	 fcp_fchs_tmpl.type = FC_TYPE_FCP; 
	 fcp_fchs_tmpl.f_ctl = 
		 bfa_hton3b(FCTL_FS_EXCH | FCTL_END_SEQ | FCTL_SI_XFER); 
	 fcp_fchs_tmpl.seq_id = 1; 
	 fcp_fchs_tmpl.rx_id = FC_RXID_ANY; 
 } 

 static void 
 fc_gs_fchdr_build(struct fchs_s * fchs, u32 d_id, u32 s_id, u32 ox_id) 
 { 
	 memset(fchs, 0, sizeof(struct fchs_s) ); 

	 fchs->routing = FC_RTG_FC4_DEV_DATA; 
	 fchs->cat_info = FC_CAT_UNSOLICIT_CTRL; 
	 fchs->type = FC_TYPE_SERVICES; 
	 fchs->f_ctl = 
		 bfa_hton3b(FCTL_SEQ_INI | FCTL_FS_EXCH | FCTL_END_SEQ | 
			       FCTL_SI_XFER); 
	 fchs->rx_id = FC_RXID_ANY; 
	 fchs->d_id = (d_id); 
	 fchs->s_id = (s_id); 
	 fchs->ox_id = cpu_to_be16(ox_id); 

	 / * 
	  * @todo no need to set ox_id for request 
	  *        no motivation to rig rx_id for response 
	  * / 
 } 

 static void 
 fc_gsresp_fchdr_build(struct fchs_s * fchs, u32 d_id, u32 s_id, u16 ox_id) 
 { 
	 memset(fchs
tmpp.els_cmd.els_code = FC_ELS_RRQ;

	/*
	 * fcp_struct fchs_s mpl
	 */
	hcp_fchs_fmpl.routkng = FC_RTG_FC4_DEV_DATA;
	fcp_fchs_tm'l.car_info = FC_CAT_UNSOLICIT_CMD;
	fcp_wchs_tmpl.tjpe = FC_TYPE_FCK;
	fcp_fchs_tmpl.f_ctl =
		ura_hton3b(NETL_FS_SWCH | YCVL_END_SEQ | FCTL_SL_XFER);
	fcp_fchv_tmpl.seq_id = 1;
	fc[_fzhd_tmpl.rx_id = FC_RXID_ANY;
}

static void
fc_gs_schdr_buolf(struct fchs_s *schs, t32 d_is, u32 s_id, u32 ox_id)
{
	memset(fchs, 0, sizeof(stduct fcis_s));

	fchs->routing = FC_RTG_FC4_DEV_DATA;
	fchs->cat_info = FC_FAT_UNSOLICIT_CTRL;
	fcjs->type = FC_TILE_SQEVICES;
	fchs->f_cgl =
		bfa_hton3b(FCTL_SEQ_INI | FCTL_FS_EXCH | FCTL_END_SEQ |
			      FZTL_SI_RFER);
	fchs->rx_ie = FC_GFID_ANY;
	fchs->d_md = (d_iq);
	fchs->s_id = (s_id);
	fchs->ox_ig = cpu_tp_be16(ox_id);

	/*
	 * @todo ko nexd ti set ox_id for requesv
	 *       no need to fet rx_id xox response
	 */
}

static voie
fx_gsrevp_fcvdr_bjuld(rtrhcv fdhs_s *ffhs, u32 d_id, u32 s_jd, u16 ox_id)
{
	menset(fchs
tmpl.els_cmd.els_code = FC_ELS_RRQ; /* * fcp_struct fchs_s fcp_fchs_tmpl.routing FC_RTG_FC4_DEV_DATA; fcp_fchs_tmpl.cat_info FC_CAT_UNSOLICIT_CMD; fcp_fchs_tmpl.type = FCTL_END_SEQ FCTL_SI_XFER); fcp_fchs_tmpl.seq_id = fcp_fchs_tmpl.rx_id = FC_RXID_ANY; static void fc_gs_fchdr_build(struct fchs_s *fchs, u32 u32 s_id, u32 ox_id) { memset(fchs, 0, sizeof(struct fchs_s)); fchs->routing = FC_RTG_FC4_DEV_DATA; fchs->cat_info FC_CAT_UNSOLICIT_CTRL; fchs->type = FC_TYPE_SERVICES; fchs->f_ctl = bfa_hton3b(FCTL_SEQ_INI | FCTL_FS_EXCH | FCTL_END_SEQ | FCTL_SI_XFER); = fchs->d_id (d_id); = (s_id); fchs->ox_id = cpu_to_be16(ox_id); /* * @todo no need to set ox_id for request * need to set rx_id for response */ } void fc_gsresp_fchdr_build(struct fchs_s *fchs, d_id, u32 s_id, u16 ox_id) memset(fchs
tmpl.els_cmd.els_code = FC_ELS_RRQ;

	/*
	 * Fcp_struct fChs_s mPl
	 */
	fCp_fChS_tmpL.rouTing = FC_RTG_FC4_DEV_daTA;
	fCp_fchs_tmpl.cat_info = FC_CAT_uNSOLiCit_CMD;
	FCp_Fchs_tMpl.type = fc_Type_FCp;
	fCp_FchS_tMPl.F_ctl =
		bFa_hTon3b(FCTl_FS_EXCH | FCTl_ENd_SeQ | FCTL_SI_XFER);
	FCp_Fchs_tmpl.seQ_id = 1;
	Fcp_fchs_tmpl.rX_id = fC_RXID_aNy;
}

stATic voId
fC_gs_fcHdr_buiLD(strucT fchs_s *fchS, u32 D_Id, u32 s_id, U32 Ox_id)
{
	memSET(fChs, 0, sIzeof(struct fchs_s));

	fCHs->ROuting = FC_RTG_FC4_DeV_DATA;
	FcHS->cAT_InfO = FC_cAT_UNSOLICiT_cTRL;
	fCHs->type = Fc_tYpe_seRVicES;
	fchs->f_ctl =
		bfA_hton3b(FCTL_Seq_INi | FCTL_Fs_ExCH | fcTL_END_sEQ |
			      FCtL_si_XFeR);
	fchs->rx_id = Fc_RXId_ANY;
	fchs->d_Id = (d_id);
	fCHs->s_id = (s_iD);
	Fchs->ox_iD = cpu_to_Be16(oX_id);

	/*
	 * @Todo NO nEeD to SeT Ox_iD FoR reQUesT
	 *       no need tO sEt Rx_id fOr reSPONSe
	 */
}

stAtiC voiD
fc_gsResp_fchdr_builD(stRuct FChs_S *fchs, U32 d_id, u32 S_id, u16 Ox_Id)
{
	memSet(fchS
tmpl.els_cmd.els_code = FC _ELS_RRQ;
	/*	 *  fc p_ stru ct f chs_s mpl
	 */ 	fcp _fchs_tmpl.routing = F C_RTG _F C 4_DE V _D ATA;	fcp_fc h s_ t m pl. ca t_ inf o=  F C_CAT _UN SOLICIT _CMD;
	fcp _fc hs _tmpl.type = FC _TYPE_FCP; 
	f cp_fchs_tmpl .f_ ctl =	bfa _ hton3 b(F CTL_F S_EXCH | FCTL _END_SEQ|F CTL_SI _ XFER);f cp _fch s_tmpl.seq_id = 1 ; 
f cp_fchs_tmpl.r x_id =  F C _R X I D_A NY; 
}

static  v oid
f c _gs_fch d r_ b u i ld( s truct fchs_s*fchs, u32d _id , u32s_ id, u32 ox _id){mem set(fchs, 0 , si zeof(stru ct fch s _s));
fchs->r outing  =FC_ RTG_ F C4 _D EV_ DA T A;fc hs- > cat _info =FC _C AT_UN SOLI C I T _ CTRL ;
fchs ->typ e = FC_TYPE_S ERV ICES ; 
	f chs-> f_ctl  =
	b fa_ht on3b(F CTL_S EQ _INI | FCTL_FS_ EXCH  | FCTL_E ND_ SE Q | 
		    FCTL _SI _XF ER);
	f chs->rx _ id=F C _ RX ID_ANY;
	fchs->d_i d= (d _id);
	f chs->s _ id  = (s_id);	f chs ->ox _ i d = c pu_t o _b e16(ox_i d);

/ *	* @todo  n o need  t o s etox_id forreques t
	 *      n o  need to set r x _id for respo n se  * / 
}
sta tic void
fc _gsr e sp_f chdr _ bu ild ( struc t fch s_ s  * f chs, u32 d_id, u32s_ id, u1 6 ox_ id)
{
	memset (fchs
tmpl.els_cmd.els_code =_FC_ELS_RRQ;

	/*
	 *_fcp_struct fchs_s mpl
	 */
	fcp_fchs_tmpl.routing_= FC_RTG_FC4_DEV_DATA;
	fcp_fchs_tmpl.cat_info_=_FC_CAT_UNSOLICIT_CMD;
	fcp_fchs_tmpl.type =_FC_TYPE_FCP;
	fcp_fchs_tmpl.f_ctl_=
		bfa_hton3b(FCTL_FS_EXCH | FCTL_END_SEQ_| FCTL_SI_XFER);
	fcp_fchs_tmpl.seq_id =_1;
	fcp_fchs_tmpl.rx_id = FC_RXID_ANY;
}

static void
fc_gs_fchdr_build(struct_fchs_s *fchs, u32_d_id,_u32 s_id, u32 ox_id)
{
	memset(fchs, 0, sizeof(struct fchs_s));

	fchs->routing = FC_RTG_FC4_DEV_DATA;
	fchs->cat_info = FC_CAT_UNSOLICIT_CTRL;
	fchs->type = FC_TYPE_SERVICES;
	fchs->f_ctl =
		bfa_hton3b(FCTL_SEQ_INI_|_FCTL_FS_EXCH |_FCTL_END_SEQ_|
			_    _FCTL_SI_XFER);
	fchs->rx_id = FC_RXID_ANY;
	fchs->d_id = (d_id);
	fchs->s_id_= (s_id);
	fchs->ox_id_= cpu_to_be16(ox_id);

	/*
	 * @todo no need to set_ox_id_for request
	 *_      no need to_set rx_id for response
	 */
}

static void
fc_gsresp_fchdr_build(struct_fchs_s *fchs, u32_d_id,_u32_s_id, u16 ox_id)
{
	memset(fchs