Syntax:
PLX_STATUS
PlxPci_DmaSetProperties(
PLX_DEVICE_OBJECT *pDevice,
U8 channel,
PLX_DMA_PROP *pDmaProp
);
PLX Chip Support:
9054, 9056, 9080, 9656, 8311, & 8000 DMA
Description:
为DMA通道更新DMA属性
Updates the DMA properties for a DMA channel
Parameters:
pDevice
Pointer to an open device
channel
The DMA channel number to access
pDmaProp
Pointer to a structure containing the DMA properties
Return Codes:
Code | Description |
ApiSuccess | The function returned successfully |
ApiNullParam | One or more parameters is NULL |
ApiInvalidDeviceInfo | The device object is not valid |
ApiPowerDown | The PLX device is in a power state that is lower than required for this function |
ApiDmaChannelInvalid | The DMA channel is not supported by the PLX chip |
ApiDmaChannelUnavailable | The DMA channel was not previously opened by the caller |
ApiDeviceInUse | The DMA channel is open but owned by another calling thread or process |
Notes:
A DMA channel must first be opened by the caller with PlxPci_DmaChannelOpen before this function can be
called.
Usage:
PLX_DMA_PROP DmaProp;
// Fill in current DMA properties
PlxPci_DmaGetProperties(
pDevice,
0, // DMA channel 0
&DmaProp
);
// Modify desired properties based on chip type
if ((PlxChip & 0xFF00) == 0x8600) || (PlxChip & 0xFF00) == 0x8700))
{
// Use relaxed ordering for data read requests
DmaProp.RelOrderDataReadReq = 1;
// Support 128B read request TLPs
DmaProp.MaxSrcXferSize = PLX_DMA_MAX_SRC_TSIZE_128B;
}
else
{
// Enable READY# input and burst of 4 DWORDS
DmaProp.ReadyInput = 1;
DmaProp.Burst = 1;
DmaProp.BurstInfinite = 0;
}
// Update DMA with new properties
PlxPci_DmaSetProperties(
pDevice,
0, // DMA channel 0
&DmaProp
);