XilinxProcessorIPLib/drivers/axiethernet/examples/xaxiethernet_mcdma_ping_req_example.c
static int RxBdSetup(XMcdma *McDmaInstPtr, XAxiEthernet *AxiEthernetInstancePtr)
{
	XMcdma_ChanCtrl *Rx_Chan;
	u8 ChanId;
	int BdCount = RXBD_CNT;
	int Status;
	UINTPTR RxBdSpacePtr;


	RxBdSpacePtr = (UINTPTR)&RxBdSpace;

	for (ChanId = 1; ChanId <= AxiEthernetInstancePtr->Config.AxiMcDmaChan_Cnt; ChanId++) {
		Rx_Chan = XMcdma_GetMcdmaRxChan(McDmaInstPtr, ChanId);

		/* Disable all interrupts */
		XMcdma_IntrDisable(Rx_Chan, XMCDMA_IRQ_ALL_MASK);

		Status = XMcDma_ChanBdCreate(Rx_Chan, (UINTPTR)RxBdSpacePtr, BdCount);
		if (Status != XST_SUCCESS) {
			xil_printf("Rx bd create failed with %d\r\n", Status);
			return XST_FAILURE;
		}

		RxBdSpacePtr += (RXBD_CNT * sizeof(XMcdma_Bd));
	 }

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function setup the buffer descriptor chain for the Ingress mcdma Channels
*
* @param	DmaInstancePtr   is a pointer to the instance of the Dma
*		component.
* @param	AxiEthernetInstancePtr is a pointer to the instance of the
*		Axi Ethernet component.
*
* @return	-XST_SUCCESS to indicate success
*		-XST_FAILURE to indicate failure
*
******************************************************************************/
This function setup the buffer descriptor chain for the Ingress mcdma Channels
This function setup the buffer descriptor chain for the Ingress mcdma Channels
static int RxBdSetup(XMcdma *McDmaInstPtr, XAxiEthernet *AxiEthernetInstancePtr)
{
	XMcdma_ChanCtrl *Rx_Chan;
	u8 ChanId;
	int BdCount = RXBD_CNT;
	int Status;
	UINTPTR RxBdSpacePtr;
	RxBdSpacePtr = (UINTPTR)&RxBdSpace;
	for (ChanId = 1; ChanId <= AxiEthernetInstancePtr->Config.AxiMcDmaChan_Cnt; ChanId++) {
		Rx_Chan = XMcdma_GetMcdmaRxChan(McDmaInstPtr, ChanId);
		XMcdma_IntrDisable(Rx_Chan, XMCDMA_IRQ_ALL_MASK);
		Status = XMcDma_ChanBdCreate(Rx_Chan, (UINTPTR)RxBdSpacePtr, BdCount);
		if (Status != XST_SUCCESS) {
			xil_printf("Rx bd create failed with %d\r\n", Status);
			return XST_FAILURE;
		}
		RxBdSpacePtr += (RXBD_CNT * sizeof(XMcdma_Bd));
	 }
	return XST_SUCCESS;
}
static int RxBdSetup ( XMcdma * McDmaInstPtr , XAxiEthernet * AxiEthernetInstancePtr ) { XMcdma_ChanCtrl * Rx_Chan ; u8 ChanId ; int BdCount = RXBD_CNT ; int Status ; UINTPTR RxBdSpacePtr ; RxBdSpacePtr = ( UINTPTR ) & RxBdSpace ; for ( ChanId = 1 ; ChanId <= AxiEthernetInstancePtr -> Config . AxiMcDmaChan_Cnt ; ChanId ++ ) { Rx_Chan = XMcdma_GetMcdmaRxChan ( McDmaInstPtr , ChanId ) ; XMcdma_IntrDisable ( Rx_Chan , XMCDMA_IRQ_ALL_MASK ) ; Status = XMcDma_ChanBdCreate ( Rx_Chan , ( UINTPTR ) RxBdSpacePtr , BdCount ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \r \n " , Status ) ; return XST_FAILURE ; } RxBdSpacePtr += ( RXBD_CNT * sizeof ( XMcdma_Bd ) ) ; } return XST_SUCCESS ; }
This function setup the buffer descriptor chain for the Ingress mcdma Channels
This function setup the buffer descriptor chain for the Ingress mcdma Channels
/* Disable all interrupts */