FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
int t3_sge_disable_fl(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, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_MASK1, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_MASK2, V_FL_SIZE(M_FL_SIZE));
	t3_write_reg(adapter, A_SG_CONTEXT_MASK3, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_DATA2, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_CMD,
		     V_CONTEXT_CMD_OPCODE(1) | F_FREELIST | 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_fl - disable an SGE free-buffer list
 *	@adapter: the adapter
 *	@id: the free list context id
 *
 *	Disable an SGE free-buffer list.  The caller is responsible for
 *	ensuring only one context operation occurs at a time.
 */
disable an SGE free-buffer list
@adapter: the adapter
@id: the free list context id

Disable an SGE free-buffer list.  The caller is responsible for
ensuring only one context operation occurs at a time.
disable an SGE free - buffer list @adapter : the adapter @id : the free list context id Disable an SGE free - buffer list . The caller is responsible for ensuring only one context operation occurs at a time .
int t3_sge_disable_fl(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, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_MASK1, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_MASK2, V_FL_SIZE(M_FL_SIZE));
	t3_write_reg(adapter, A_SG_CONTEXT_MASK3, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_DATA2, 0);
	t3_write_reg(adapter, A_SG_CONTEXT_CMD,
		     V_CONTEXT_CMD_OPCODE(1) | F_FREELIST | 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_fl ( 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 , 0 ) ; t3_write_reg ( adapter , A_SG_CONTEXT_MASK1 , 0 ) ; t3_write_reg ( adapter , A_SG_CONTEXT_MASK2 , V_FL_SIZE ( M_FL_SIZE ) ) ; t3_write_reg ( adapter , A_SG_CONTEXT_MASK3 , 0 ) ; t3_write_reg ( adapter , A_SG_CONTEXT_DATA2 , 0 ) ; t3_write_reg ( adapter , A_SG_CONTEXT_CMD , V_CONTEXT_CMD_OPCODE ( 1 ) | F_FREELIST | 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_fl - disable an SGE free-buffer list
      @adapter: the adapter
      @id: the free list context id
t3_sge_disable_fl - disable an SGE free - buffer list @adapter : the adapter @id : the free list context id