20.12.2012 Views

2.2 BSP Rel. 1.0 for PPMC-275 Programmer's Guide

2.2 BSP Rel. 1.0 for PPMC-275 Programmer's Guide

2.2 BSP Rel. 1.0 for PPMC-275 Programmer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

API Call Reference List of APIs<br />

SDMA_STATUS sdmaRxReturnBuff(SDMA_CHANNEL *sdmaChan, PKT_INFO *pPktInfo)<br />

DESCRIPTION This routine returns a Rx buffer back to the Rx ring. It retrieves the<br />

next 'used' descriptor and attached the returned buffer to it. In case<br />

the Rx queue was in "resource error" condition, where there are no<br />

available Rx resources, the function resets the resource error flag.<br />

INPUT<br />

SDMA_CHANNEL<br />

*sdmaChan<br />

PKT_INFO<br />

*pPktInfo<br />

SDMA channel struct pointer<br />

Packet struct pointer.<br />

OUTPUT New available Rx resource in Rx descriptor ring.<br />

RETURN<br />

Driver Introduction<br />

Software Modules<br />

SDMA_ERROR In case the routine can not access Rx desc ring.<br />

SDMA_OK Otherwise.<br />

This module allocates the descriptors <strong>for</strong> each MPSC and each<br />

Ethernet port (separate chain <strong>for</strong> each priority) depending on the<br />

protocol programmed <strong>for</strong> this port. The descriptors allocating<br />

method defines the minimum and maximum number of descriptors<br />

per port protocol. Each protocol allows a limited number of<br />

descriptors to avoid one port consuming all the resources. Each<br />

descriptor chain allocation results in the addition of the chain's<br />

first pointer to a table of pointers that is used by the Low Level<br />

Driver to initialize the DMA.<br />

Tx descriptors are allocated <strong>for</strong> each port (four Tx DMA exist) with<br />

Buffer Pointer NULL.<br />

This driver is implemented in:<br />

• sdma.c<br />

VxWorks 5.5/Tornado <strong>2.2</strong> <strong>BSP</strong> <strong>Rel</strong>. <strong>1.0</strong> <strong>for</strong> <strong>PPMC</strong>-<strong>275</strong> 5 - 65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!