FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	t3_sge_disable_rspcntxt - disable an SGE response queue
 *	@adapter: the adapter
 *	@id: the response queue context id
 *
 *	Disable an SGE response queue.  The caller is responsible for
 *	ensuring only one context operation occurs at a time.
 */
disable an SGE response queue
@adapter: the adapter
@id: the response queue context id

Disable an SGE response queue.  The caller is responsible for
ensuring only one context operation occurs at a time.
disable an SGE response queue @adapter : the adapter @id : the response queue context id Disable an SGE response queue . The caller is responsible for ensuring only one context operation occurs at a time .
int t3_sge_disable_rspcntxt(adapter_t *adapter, unsigned int id)
{
	if (t3_read_reg(adapter, A_SG_CONTEXT_CMD) & F_CONTEXT_CMD_BUSY)
		return -EBUSY;
	t3_write_reg(adapter, A_SG_CONTEXT_MASK0, V_CQ_SIZE(M_CQ_SIZE));
	t3_write_reg(adapter, A_SG_CONTEXT_MASK1, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_MASK2, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_MASK3, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_DATA0, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_CMD,
		     V_CONTEXT_CMD_OPCODE(1) | F_RESPONSEQ | V_CONTEXT(id));
	return t3_wait_op_done(adapter, A_SG_CONTEXT_CMD, F_CONTEXT_CMD_BUSY,
			       0, SG_CONTEXT_CMD_ATTEMPTS, 1);
}
int t3_sge_disable_rspcntxt ( adapter_t * adapter , unsigned int id ) { if ( t3_read_reg ( adapter , A_SG_CONTEXT_CMD ) & F_CONTEXT_CMD_BUSY ) return - EBUSY ; t3_write_reg ( adapter , A_SG_CONTEXT_MASK0 , V_CQ_SIZE ( M_CQ_SIZE ) ) ; t3_write_reg ( adapter , A_SG_CONTEXT_MASK1 , 0 ) ; t3_write_reg ( adapter , A_SG_CONTEXT_MASK2 , 0 ) ; t3_write_reg ( adapter , A_SG_CONTEXT_MASK3 , 0 ) ; t3_write_reg ( adapter , A_SG_CONTEXT_DATA0 , 0 ) ; t3_write_reg ( adapter , A_SG_CONTEXT_CMD , V_CONTEXT_CMD_OPCODE ( 1 ) | F_RESPONSEQ | V_CONTEXT ( id ) ) ; return t3_wait_op_done ( adapter , A_SG_CONTEXT_CMD , F_CONTEXT_CMD_BUSY , 0 , SG_CONTEXT_CMD_ATTEMPTS , 1 ) ; }
t3_sge_disable_rspcntxt - disable an SGE response queue
      @adapter: the adapter
      @id: the response queue context id
t3_sge_disable_rspcntxt - disable an SGE response queue @adapter : the adapter @id : the response queue context id