FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	t3_get_cong_cntl_tab - reads the congestion control table
 *	@adap: the adapter
 *	@incr: where to store the alpha values
 *
 *	Reads the additive increments programmed into the HW congestion
 *	control table.
 */
reads the congestion control table
@adap: the adapter
@incr: where to store the alpha values

Reads the additive increments programmed into the HW congestion
control table.
reads the congestion control table @adap : the adapter @incr : where to store the alpha values Reads the additive increments programmed into the HW congestion control table .
void t3_get_cong_cntl_tab(adapter_t *adap,
			  unsigned short incr[NMTUS][NCCTRL_WIN])
{
	unsigned int mtu, w;
	for (mtu = 0; mtu < NMTUS; ++mtu)
		for (w = 0; w < NCCTRL_WIN; ++w) {
			t3_write_reg(adap, A_TP_CCTRL_TABLE,
				     0xffff0000 | (mtu << 5) | w);
			incr[mtu][w] = (unsigned short)t3_read_reg(adap,
				        A_TP_CCTRL_TABLE) & 0x1fff;
		}
}
void t3_get_cong_cntl_tab ( adapter_t * adap , unsigned short incr [ NMTUS ] [ NCCTRL_WIN ] ) { unsigned int mtu , w ; for ( mtu = 0 ; mtu < NMTUS ; ++ mtu ) for ( w = 0 ; w < NCCTRL_WIN ; ++ w ) { t3_write_reg ( adap , A_TP_CCTRL_TABLE , 0xffff0000 | ( mtu << 5 ) | w ) ; incr [ mtu ] [ w ] = ( unsigned short ) t3_read_reg ( adap , A_TP_CCTRL_TABLE ) & 0x1fff ; } }
t3_get_cong_cntl_tab - reads the congestion control table
      @adap: the adapter
      @incr: where to store the alpha values
t3_get_cong_cntl_tab - reads the congestion control table @adap : the adapter @incr : where to store the alpha values