Lines Matching defs:buffer
26 * Generic buffer handling
31 int efx_nic_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer,
34 buffer->addr = dma_alloc_coherent(&efx->pci_dev->dev, len,
35 &buffer->dma_addr, gfp_flags);
36 if (!buffer->addr)
38 buffer->len = len;
42 void efx_nic_free_buffer(struct efx_nic *efx, struct efx_buffer *buffer)
44 if (buffer->addr) {
45 dma_free_coherent(&efx->pci_dev->dev, buffer->len,
46 buffer->addr, buffer->dma_addr);
47 buffer->addr = NULL;
322 * efx_nic_copy_stats - Copy stats from the DMA buffer in to an
323 * intermediate buffer. This is used to get a consistent
324 * set of stats while the DMA buffer can be written at any time
327 * @dest: Destination buffer. Must be the same size as the DMA buffer.
365 * efx_nic_update_stats - Convert statistics DMA buffer to array of u64
366 * @desc: Array of &struct efx_hw_stat_desc describing the DMA buffer
374 * @dma_buf: DMA buffer containing hardware statistics