FreeBSD/sys/mips/nlm/dev/net/nae.c
/*
 * Set IOR credits for the ports in ifmask to valmask
 */
Set IOR credits for the ports in ifmask to valmask
Set IOR credits for the ports in ifmask to valmask
static void
nlm_nae_set_ior_credit(uint64_t nae_base, uint32_t ifmask, uint32_t valmask)
{
	uint32_t tx_config, tx_ior_credit;
	tx_ior_credit = nlm_read_nae_reg(nae_base, NAE_TX_IORCRDT_INIT);
	tx_ior_credit &= ~ifmask;
	tx_ior_credit |= valmask;
	nlm_write_nae_reg(nae_base, NAE_TX_IORCRDT_INIT, tx_ior_credit);
	tx_config = nlm_read_nae_reg(nae_base, NAE_TX_CONFIG);
	nlm_write_nae_reg(nae_base, NAE_TX_CONFIG,
	    tx_config | (TXINITIORCR(ifmask)));
	nlm_write_nae_reg(nae_base, NAE_TX_CONFIG,
	    tx_config & ~(TXINITIORCR(ifmask)));
}
static void nlm_nae_set_ior_credit ( uint64_t nae_base , uint32_t ifmask , uint32_t valmask ) { uint32_t tx_config , tx_ior_credit ; tx_ior_credit = nlm_read_nae_reg ( nae_base , NAE_TX_IORCRDT_INIT ) ; tx_ior_credit &= ~ ifmask ; tx_ior_credit |= valmask ; nlm_write_nae_reg ( nae_base , NAE_TX_IORCRDT_INIT , tx_ior_credit ) ; tx_config = nlm_read_nae_reg ( nae_base , NAE_TX_CONFIG ) ; nlm_write_nae_reg ( nae_base , NAE_TX_CONFIG , tx_config | ( TXINITIORCR ( ifmask ) ) ) ; nlm_write_nae_reg ( nae_base , NAE_TX_CONFIG , tx_config & ~ ( TXINITIORCR ( ifmask ) ) ) ; }
Set IOR credits for the ports in ifmask to valmask
Set IOR credits for the ports in ifmask to valmask
/* need to toggle these bits for credits to be loaded */