FreeBSD/sys/dev/ntb/ntb_hw/ntb_hw.c
/*
 * ntb_mw_set_wc - Set the write-combine status of a memory window
 *
 * If 'mode' matches the current status, this does nothing and succeeds.  Mode
 * is a VM_MEMATTR_* type.
 *
 * Returns:  Zero on success, setting the caching attribute on the virtual
 * mapping of the BAR; otherwise an error number (e.g. if idx is an invalid
 * memory window, or if changing the caching attribute fails).
 */
Set the write-combine status of a memory window
If 'mode' matches the current status, this does nothing and succeeds.  Mode
is a VM_MEMATTR_* type.

Zero on success, setting the caching attribute on the virtual
mapping of the BAR; otherwise an error number .
Set the write - combine status of a memory window If ' mode ' matches the current status this does nothing and succeeds . Mode is a VM_MEMATTR_ * type . Zero on success setting the caching attribute on the virtual mapping of the BAR ; otherwise an error number .
int
ntb_mw_set_wc(struct ntb_softc *ntb, unsigned idx, vm_memattr_t mode)
{
	if (idx >= ntb_mw_count(ntb))
		return (EINVAL);
	idx = ntb_user_mw_to_idx(ntb, idx);
	return (ntb_mw_set_wc_internal(ntb, idx, mode));
}
int ntb_mw_set_wc ( struct ntb_softc * ntb , unsigned idx , vm_memattr_t mode ) { if ( idx >= ntb_mw_count ( ntb ) ) return ( EINVAL ) ; idx = ntb_user_mw_to_idx ( ntb , idx ) ; return ( ntb_mw_set_wc_internal ( ntb , idx , mode ) ) ; }
ntb_mw_set_wc - Set the write-combine status of a memory window
 If 'mode' matches the current status, this does nothing and succeeds.
ntb_mw_set_wc - Set the write - combine status of a memory window If ' mode ' matches the current status this does nothing and succeeds .