FreeBSD/sys/dev/cxgbe/common/t4_hw.c
/**
 *      t4_sge_ctxt_flush - flush the SGE context cache
 *      @adap: the adapter
 *      @mbox: mailbox to use for the FW command
 *
 *      Issues a FW command through the given mailbox to flush the
 *      SGE context cache.
 */
flush the SGE context cache
@adap: the adapter
@mbox: mailbox to use for the FW command

Issues a FW command through the given mailbox to flush the
SGE context cache.
flush the SGE context cache @adap : the adapter @mbox : mailbox to use for the FW command Issues a FW command through the given mailbox to flush the SGE context cache .
int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox)
{
	int ret;
	u32 ldst_addrspace;
	struct fw_ldst_cmd c;
	memset(&c, 0, sizeof(c));
	ldst_addrspace = V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_SGE_EGRC);
	c.op_to_addrspace = cpu_to_be32(V_FW_CMD_OP(FW_LDST_CMD) |
					F_FW_CMD_REQUEST | F_FW_CMD_READ |
					ldst_addrspace);
	c.cycles_to_len16 = cpu_to_be32(FW_LEN16(c));
	c.u.idctxt.msg_ctxtflush = cpu_to_be32(F_FW_LDST_CMD_CTXTFLUSH);
	ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c);
	return ret;
}
int t4_sge_ctxt_flush ( struct adapter * adap , unsigned int mbox ) { int ret ; u32 ldst_addrspace ; struct fw_ldst_cmd c ; memset ( & c , 0 , sizeof ( c ) ) ; ldst_addrspace = V_FW_LDST_CMD_ADDRSPACE ( FW_LDST_ADDRSPC_SGE_EGRC ) ; c . op_to_addrspace = cpu_to_be32 ( V_FW_CMD_OP ( FW_LDST_CMD ) | F_FW_CMD_REQUEST | F_FW_CMD_READ | ldst_addrspace ) ; c . cycles_to_len16 = cpu_to_be32 ( FW_LEN16 ( c ) ) ; c . u . idctxt . msg_ctxtflush = cpu_to_be32 ( F_FW_LDST_CMD_CTXTFLUSH ) ; ret = t4_wr_mbox ( adap , mbox , & c , sizeof ( c ) , & c ) ; return ret ; }
t4_sge_ctxt_flush - flush the SGE context cache
      @adap: the adapter
      @mbox: mailbox to use for the FW command
t4_sge_ctxt_flush - flush the SGE context cache @adap : the adapter @mbox : mailbox to use for the FW command