FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	t3_get_tp_version - read the tp sram version
 *	@adapter: the adapter
 *	@vers: where to place the version
 *
 *	Reads the protocol sram version from sram.
 */
read the tp sram version
@adapter: the adapter
@vers: where to place the version

Reads the protocol sram version from sram.
read the tp sram version @adapter : the adapter @vers : where to place the version Reads the protocol sram version from sram .
int t3_get_tp_version(adapter_t *adapter, u32 *vers)
{
	int ret;
	t3_write_reg(adapter, A_TP_EMBED_OP_FIELD0, 0);
	ret = t3_wait_op_done(adapter, A_TP_EMBED_OP_FIELD0,
			      1, 1, 5, 1);
	if (ret)
		return ret;
	*vers = t3_read_reg(adapter, A_TP_EMBED_OP_FIELD1);
	return 0;
}
int t3_get_tp_version ( adapter_t * adapter , u32 * vers ) { int ret ; t3_write_reg ( adapter , A_TP_EMBED_OP_FIELD0 , 0 ) ; ret = t3_wait_op_done ( adapter , A_TP_EMBED_OP_FIELD0 , 1 , 1 , 5 , 1 ) ; if ( ret ) return ret ; * vers = t3_read_reg ( adapter , A_TP_EMBED_OP_FIELD1 ) ; return 0 ; }
t3_get_tp_version - read the tp sram version
      @adapter: the adapter
      @vers: where to place the version
t3_get_tp_version - read the tp sram version @adapter : the adapter @vers : where to place the version
/* Get version loaded in SRAM */