FreeBSD/sys/dev/ntb/ntb_hw/ntb_hw.c
/*
 * ntb_mw_count() - Get the number of memory windows available for KPI
 * consumers.
 *
 * (Excludes any MW wholly reserved for register access.)
 */
Get the number of memory windows available for KPI
consumers.

(Excludes any MW wholly reserved for register access.)
Get the number of memory windows available for KPI consumers . ( Excludes any MW wholly reserved for register access . )
uint8_t
ntb_mw_count(struct ntb_softc *ntb)
{
	uint8_t res;
	res = ntb->mw_count;
	if (ntb->b2b_mw_idx != B2B_MW_DISABLED && ntb->b2b_off == 0)
		res--;
	if (ntb->msix_mw_idx != B2B_MW_DISABLED)
		res--;
	return (res);
}
uint8_t ntb_mw_count ( struct ntb_softc * ntb ) { uint8_t res ; res = ntb -> mw_count ; if ( ntb -> b2b_mw_idx != B2B_MW_DISABLED && ntb -> b2b_off == 0 ) res -- ; if ( ntb -> msix_mw_idx != B2B_MW_DISABLED ) res -- ; return ( res ) ; }
ntb_mw_count() - Get the number of memory windows available for KPI
 consumers.
ntb_mw_count () - Get the number of memory windows available for KPI consumers .