/* The memory space must be word-aligned. An assert will occur if asserts are turned on and the memory is not word-aligned. */
XStatus XEmac_SetSgRecvSpace(XEmac *InstancePtr, u32 *MemoryPtr, u32 ByteCount)
/* The memory space must be word-aligned. An assert will occur if asserts are turned on and the memory is not word-aligned. */
XStatus XEmac_SetSgRecvSpace(XEmac *InstancePtr, u32 *MemoryPtr, u32 ByteCount)
{
	XASSERT_NONVOID(InstancePtr != NULL);
	XASSERT_NONVOID(MemoryPtr != NULL);
	XASSERT_NONVOID(ByteCount != 0);
	XASSERT_NONVOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);
	if (!XEmac_mIsSgDma(InstancePtr)) {
		return XST_NOT_SGDMA;
	}
	return XDmaChannel_CreateSgList(&InstancePtr->RecvChannel, MemoryPtr,
					ByteCount);
}