/* Masks the S2MM error interrupt for the provided error mask value */
int XAxiVdma_MaskS2MMErrIntr(XAxiVdma *InstancePtr, u32 ErrorMask, u16 Direction)
/* Masks the S2MM error interrupt for the provided error mask value */
int XAxiVdma_MaskS2MMErrIntr(XAxiVdma *InstancePtr, u32 ErrorMask, u16 Direction)
{
	XAxiVdma_Channel *Channel;
	if (Direction != XAXIVDMA_WRITE) {
		return XST_INVALID_PARAM;
	}
	Channel = XAxiVdma_GetChannel(InstancePtr, Direction);
	if (!Channel) {
		return XST_INVALID_PARAM;
	}
	if (Channel->IsValid) {
		XAxiVdma_WriteReg(Channel->ChanBase,
			XAXIVDMA_S2MM_DMA_IRQ_MASK_OFFSET,
			ErrorMask & XAXIVDMA_S2MM_IRQ_ERR_ALL_MASK);
		return XST_SUCCESS;
	}
	return XST_DEVICE_NOT_FOUND;
}