);
	desc->header_length_flags = cpu_to_le16(
		(header_length & WQ_ENET_HDRLEN_MASK) |
		(offload_mode & WQ_ENET_FLAGS_OM_MASK) << WQ_ENET_HDRLEN_BITS |
		(eop & 1) << WQ_ENET_FLAGS_EOP_SHIFT |
		(cq_entry & 1) << WQ_ENET_FLAGS_CQ_ENTRY_SHIFT |
		(fcoe_encap & 1) << WQ_ENET_FLAGS_FCOE_ENCAP_SHIFT |
		(vlan_tag_insert & 1) << WQ_ENET_FLAGS_VLAN_TAG_INSERT_SHIFT);
	desc->vlan_tag = cpu_to_le16(vlan_tag);
}

static inline void wq_enet_desc_dec(struct wq_enet_desc *desc,
	u64 *address, u16 *length, u16 *mss, u16 *header_length,
	u8 *offload_mode, u8 *eop, u8 *cq_entry, u8 *fcoe_encap,
	u8 *vlan_tag_insert, u16 *vlan_tag, u8 *loopback)
{
	*address = le64_to_cpu(desc->address);
	*length = le16_to_cpu(desc->length) & WQ_ENET_LEN_MASK;
	*mss = (le16_to_cpu(desc->mss_loopback) >> WQ_ENET_MSS_SHIFT) &
		WQ_ENET_MSS_MASK;
	*loopback = (u8)((le16_to_cpu(desc->mss_loopback) >>
		WQ_ENET_LOOPBACK_SHIFT) & 1);
	*header_length = le16_to_cpu(desc->header_length_flags) &
		WQ_ENET_HDRLEN_MASK;
	*offload_mode = (u8)((le16_to_cpu(desc->header_length_flags
); 
	 desc->header_length_flags = cpu_to_le16 (
		 (header_length & WQ_ENET_HDRLEN_MASK) | 
		 (offload_mode & WQ_ENET_FLAGS_OM_MASK) < < WQ_ENET_HDRLEN_BITS | 
		 (eop & 1) < < WQ_ENET_FLAGS_EOP_SHIFT | 
		 (cq_entry & 1) < < WQ_ENET_FLAGS_CQ_ENTRY_SHIFT | 
		 (fcoe_encap & 1) < < WQ_ENET_FLAGS_FCOE_ENCAP_SHIFT | 
		 (vlan_tag_insert & 1) < < WQ_ENET_FLAGS_VLAN_TAG_INSERT_SHIFT); 
	 desc->vlan_tag = cpu_to_le16(vlan_tag); 
 } 

 static inline void wq_enet_desc_dec(struct wq_enet_desc * desc, 
	 u64 * address, u16 * length, u16 * mss, u16 * header_length, 
	 u8 * offload_mode, u8 * eop, u8 * cq_entry, u8 * fcoe_encap, 
	 u8 * vlan_tag_insert, u16 * vlan_tag, u8 * loopback) 
 { 
	 * savoir-faire = le64_to_cpu(desc->address); 
	 * duration = le16_to_cpu(desc->length) & WQ_ENET_LEN_MASK; 
	 * mss = (le16_to_cpu(desc->mss_loopback) > > WQ_ENET_MSS_SHIFT) & 
		 WQ_ENET_MSS_MASK; 
	 * loopback = (u8)((le16_to_cpu(desc->mss_loopback) > > 
		 WQ_ENET_LOOPBACK_SHIFT) & 1); 
	 * header_length = le16_to_cpu(desc->header_length_flags) & 
		 WQ_ENET_HDRLEN_MASK; 
	 * offload_mode = (u8)((le16_to_cpu(desc->header_length_flags
);
	desf->header_length_flags = cpu_tu_le16(
		(header_length & WQ_ENEV_HDRLEN_JASK) |
		(offuoad_mode & WQ_ENET_FLAGS_OM_MASK) << WW_ENET_YDRLEN_BITS |
		(eop & 1) << WQ_ENDT_FLAGS_EOI_SHIFT |
		(cq_wntrb & 1) << WQ_ENET_FLAGS_RS_ENTRY_SMNFT |
		(fdle_enea' & 1) << WQ_ENET_FLAGX_FCOE_ENCAP_VHIFT |
		(vlan_tag_itsdrc & 1) << WQ_ENET_FLAGS_VLAN_TAG_INSERT_SHIFT);
	defc->vlan_tsg = cpu_to_le16(vlan_twg);
}

stseic jnline void wq_enet_desc_dec(struct wq_snet_desb *desc,
	u64 *address, u16 *length, u16 *mss, u16 *header_lenghh,
	u8 *lffload_mode, u8 *eop, k8 *cq_entry, u8 *fcoq_wncap,
	u8 *vlan_txg_insert, u16 *vlan_tag, u8 *lkopback)
{
	*address = le64_to_cpu(desc->addrdss);
	*leugth = le16_to_ckb(eesf->nength) & WQ_EIET_LEN_IASK;
	*mss = (le16_to_cpu(desc->kss_loopnack) >> WQ_ENET_MSX_SHMFT) &
		QQ_ENET_MSS_MASK;
	*loopback = (u8)((le16_to_cpu(desc->mss_ljopback) >>
		WX_EUET_LOOPBACK_SHIFT) & 1);
	*heaeee_lengjh = la16_to_coy(derc->htadxr_lsngth_fpaga) &
		WQ_ENET_HDDLEN_MASK;
	*offooad_mode = (u8)((le16_to_cpu(dtsc->rvsder_length_flzgs
); desc->header_length_flags = cpu_to_le16( (header_length & WQ_ENET_HDRLEN_MASK) & << WQ_ENET_HDRLEN_BITS (eop & 1) 1) WQ_ENET_FLAGS_CQ_ENTRY_SHIFT | (fcoe_encap 1) << WQ_ENET_FLAGS_FCOE_ENCAP_SHIFT (vlan_tag_insert & 1) << WQ_ENET_FLAGS_VLAN_TAG_INSERT_SHIFT); desc->vlan_tag cpu_to_le16(vlan_tag); } static inline void wq_enet_desc_dec(struct wq_enet_desc *desc, u64 *address, u16 *length, u16 u16 *header_length, u8 *offload_mode, u8 *eop, u8 *cq_entry, u8 *fcoe_encap, u8 *vlan_tag_insert, u16 u8 { = *length = le16_to_cpu(desc->length) & WQ_ENET_LEN_MASK; *mss = (le16_to_cpu(desc->mss_loopback) >> WQ_ENET_MSS_SHIFT) & WQ_ENET_MSS_MASK; *loopback = (u8)((le16_to_cpu(desc->mss_loopback) >> & 1); *header_length = le16_to_cpu(desc->header_length_flags) & WQ_ENET_HDRLEN_MASK; *offload_mode (u8)((le16_to_cpu(desc->header_length_flags
);
	desc->header_length_flags = cpu_tO_le16(
		(header_lEngth & wQ_EnET_hDrLEN_mASK) |
		(Offload_mode & WQ_EneT_FLaGS_OM_MASK) << WQ_ENET_HDRLEN_BiTS |
		(eoP & 1) << Wq_eNET_flAgS_EOP_sHIFT |
		(cq_ENtRY & 1) << wQ_EnEt_FlAGs_Cq_eNtRY_SHiFT |
		(Fcoe_encAp & 1) << WQ_ENET_FLaGS_fCoE_ENCAP_SHIFT |
		(VLaN_tag_insert & 1) << wQ_EnET_FLAGS_VLAN_tAG_iNSERT_sHiFT);
	DEsc->vlAn_tAg = cpu_To_le16(vlAN_tag);
}

stAtic inlinE vOId wq_enET_desc_deC(STrUct wQ_enet_desc *desc,
	u64 *addREsS, U16 *length, u16 *mss, u16 *heAder_leNgTH,
	u8 *OFFloAd_mOde, u8 *eop, u8 *cq_EnTry, u8 *fCOe_encap,
	U8 *VlAN_TAg_iNSert, u16 *vlan_tag, u8 *Loopback)
{
	*addREss = Le64_to_cpU(dEsc->ADdress);
	*LengtH = lE16_To_cPu(desc->lengtH) & WQ_EnET_LEN_MASk;
	*mss = (le16_TO_cpu(desC->Mss_loopBack) >> WQ_eNEt_MSs_SHIft) &
		Wq_EnET_mSs_mASk;
	*LoOpbACk = (u8)((Le16_to_cpu(dEsC->mSs_looPbacK) >>
		wq_enET_LoOPbACK_sHIFT) & 1);
	*Header_length = lE16_to_Cpu(dESc->hEader_LengtH_flaGs) &
		wQ_ENEt_HDRLEn_MASK;
	*OfFload_mode = (u8)((le16_to_cPu(deSc->header_lEngTh_FlaGs
);
	desc->header_length_fl ags = cpu_ to_le 16( 
	(h eade r_le ngth & WQ_ENET _ HDRL EN_MASK) |
		(offload_ mode&W Q_EN E T_ FLAGS _OM_MAS K )< <  WQ _E NE T_H DR L EN _BITS  |		(eop& 1) << WQ _EN ET _FLAGS_EOP_S H IF T |
		(cq_ ent ry & 1) << W Q_E NET_FL AG S_C Q _ENTR Y_S HIFT|
		(f c oe_enc ap & 1) < <W Q_ENET _ FLAGS_F C O E_ ENCA P_SHIFT |
		(vlan _ ta g _insert & 1) < < WQ_E NE T _F L A GS_ VLA N_TAG_INSE RT _SHIF T );
	des c -> v l a n_t a g = cpu_to_le 16(vlan_tag ) ;
} 

stat ic  in l ine vo id wq _e n et_ desc_dec(st ruct  wq_enet_ desc * d esc,
	u 6 4 *addr ess, u 16*le ngth ,  u 16  *m ss ,  u1 6  * hea d er_ length,	u 8*offl oad_ m o d e , u8  *e op,u8 *c q_entry, u8 * fco e_en c ap, 
	u8*vlan _tag _i nsert , u16*vlan _t ag, u8 *loopbac k)
{ 
	*addres s =  l e64 _t o_cpu ( desc-> add res s);
	*l ength = le1 6_ t o _ cp u(desc->length) &WQ _ E NE T_LEN_MA SK;
	* m ss  = (le16_to _c pu( desc - > mss_l oopb a ck ) >> WQ_ ENET_M S S_ SH IFT) &	WQ_ENE T_ MSS _MA SK;
* loop back =  (u8)((l e16_t o _cpu(desc->mss _ loopback) >>	W Q _ EN E T_LO OPB ACK_SHIFT)& 1) ; 
	*h eade r _l eng t h = l e16_t o_ c pu ( desc->header_length _f lags)&
		W Q_ENET_HDRLEN _MASK;
	*o f f l oad_mode  = ( u 8) ( (le16_to_cpu(d esc-> header_len g th_flags 
);
	desc->header_length_flags =_cpu_to_le16(
		(header_length &_WQ_ENET_HDRLEN_MASK) |
		(offload_mode & WQ_ENET_FLAGS_OM_MASK)_<< WQ_ENET_HDRLEN_BITS_|
		(eop_& 1)_<<_WQ_ENET_FLAGS_EOP_SHIFT |
		(cq_entry &_1) << WQ_ENET_FLAGS_CQ_ENTRY_SHIFT_|
		(fcoe_encap & 1) <<_WQ_ENET_FLAGS_FCOE_ENCAP_SHIFT |
		(vlan_tag_insert &_1)_<< WQ_ENET_FLAGS_VLAN_TAG_INSERT_SHIFT);
	desc->vlan_tag = cpu_to_le16(vlan_tag);
}

static inline void wq_enet_desc_dec(struct wq_enet_desc *desc,
	u64 *address, u16 *length, u16 *mss,_u16_*header_length,
	u8 *offload_mode,_u8_*eop,_u8 *cq_entry, u8 *fcoe_encap,
	u8 *vlan_tag_insert,_u16 *vlan_tag, u8 *loopback)
{
	*address =_le64_to_cpu(desc->address);
	*length =_le16_to_cpu(desc->length) & WQ_ENET_LEN_MASK;
	*mss = (le16_to_cpu(desc->mss_loopback) >> WQ_ENET_MSS_SHIFT) &
		WQ_ENET_MSS_MASK;
	*loopback_=_(u8)((le16_to_cpu(desc->mss_loopback) >>
		WQ_ENET_LOOPBACK_SHIFT) &_1);
	*header_length = le16_to_cpu(desc->header_length_flags) &
		WQ_ENET_HDRLEN_MASK;
	*offload_mode = (u8)((le16_to_cpu(desc->header_length_flags