FreeBSD/sys/dev/cxgbe/common/t4_hw.c
/**
 *	t4_read_cong_tbl - 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 t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN])
{
	unsigned int mtu, w;
	for (mtu = 0; mtu < NMTUS; ++mtu)
		for (w = 0; w < NCCTRL_WIN; ++w) {
			t4_write_reg(adap, A_TP_CCTRL_TABLE,
				     V_ROWINDEX(0xffff) | (mtu << 5) | w);
			incr[mtu][w] = (u16)t4_read_reg(adap,
						A_TP_CCTRL_TABLE) & 0x1fff;
		}
}
void t4_read_cong_tbl ( struct adapter * adap , u16 incr [ NMTUS ] [ NCCTRL_WIN ] ) { unsigned int mtu , w ; for ( mtu = 0 ; mtu < NMTUS ; ++ mtu ) for ( w = 0 ; w < NCCTRL_WIN ; ++ w ) { t4_write_reg ( adap , A_TP_CCTRL_TABLE , V_ROWINDEX ( 0xffff ) | ( mtu << 5 ) | w ) ; incr [ mtu ] [ w ] = ( u16 ) t4_read_reg ( adap , A_TP_CCTRL_TABLE ) & 0x1fff ; } }
t4_read_cong_tbl - reads the congestion control table
      @adap: the adapter
      @incr: where to store the alpha values
t4_read_cong_tbl - reads the congestion control table @adap : the adapter @incr : where to store the alpha values