nic.c (9095bf25ea08135a5b74875dd0e3eeaddc4218a0) nic.c (750afb08ca71310fcf0c4e2cb1565c63b8235b60)
1/****************************************************************************
2 * Driver for Solarflare network controllers and boards
3 * Copyright 2005-2006 Fen Systems Ltd.
4 * Copyright 2006-2013 Solarflare Communications Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation, incorporated herein by reference.

--- 19 unchanged lines hidden (view full) ---

28 * Generic buffer handling
29 * These buffers are used for interrupt status, MAC stats, etc.
30 *
31 **************************************************************************/
32
33int ef4_nic_alloc_buffer(struct ef4_nic *efx, struct ef4_buffer *buffer,
34 unsigned int len, gfp_t gfp_flags)
35{
1/****************************************************************************
2 * Driver for Solarflare network controllers and boards
3 * Copyright 2005-2006 Fen Systems Ltd.
4 * Copyright 2006-2013 Solarflare Communications Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation, incorporated herein by reference.

--- 19 unchanged lines hidden (view full) ---

28 * Generic buffer handling
29 * These buffers are used for interrupt status, MAC stats, etc.
30 *
31 **************************************************************************/
32
33int ef4_nic_alloc_buffer(struct ef4_nic *efx, struct ef4_buffer *buffer,
34 unsigned int len, gfp_t gfp_flags)
35{
36 buffer->addr = dma_zalloc_coherent(&efx->pci_dev->dev, len,
37 &buffer->dma_addr, gfp_flags);
36 buffer->addr = dma_alloc_coherent(&efx->pci_dev->dev, len,
37 &buffer->dma_addr, gfp_flags);
38 if (!buffer->addr)
39 return -ENOMEM;
40 buffer->len = len;
41 return 0;
42}
43
44void ef4_nic_free_buffer(struct ef4_nic *efx, struct ef4_buffer *buffer)
45{

--- 482 unchanged lines hidden ---
38 if (!buffer->addr)
39 return -ENOMEM;
40 buffer->len = len;
41 return 0;
42}
43
44void ef4_nic_free_buffer(struct ef4_nic *efx, struct ef4_buffer *buffer)
45{

--- 482 unchanged lines hidden ---