summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/intel.c
diff options
context:
space:
mode:
authorMichael Brown2020-11-05 20:08:48 +0100
committerMichael Brown2020-11-05 20:13:52 +0100
commitbe1c87b72237f633c4f4b05bcb133acf2967d788 (patch)
treeadc9bc36da62d55f0f1f5708af7c66d1cc3af949 /src/drivers/net/intel.c
parent[efi] Retain a long-lived reference to the EFI_PCI_IO_PROTOCOL instance (diff)
downloadipxe-be1c87b72237f633c4f4b05bcb133acf2967d788.tar.gz
ipxe-be1c87b72237f633c4f4b05bcb133acf2967d788.tar.xz
ipxe-be1c87b72237f633c4f4b05bcb133acf2967d788.zip
[malloc] Rename malloc_dma() to malloc_phys()
The malloc_dma() function allocates memory with specified physical alignment, and is typically (though not exclusively) used to allocate memory for DMA. Rename to malloc_phys() to more closely match the functionality, and to create name space for functions that specifically allocate and map DMA-capable buffers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/intel.c')
-rw-r--r--src/drivers/net/intel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/net/intel.c b/src/drivers/net/intel.c
index 97f50a943..3a4e4341b 100644
--- a/src/drivers/net/intel.c
+++ b/src/drivers/net/intel.c
@@ -504,7 +504,7 @@ int intel_create_ring ( struct intel_nic *intel, struct intel_ring *ring ) {
* prevent any possible page-crossing errors due to hardware
* errata.
*/
- ring->desc = malloc_dma ( ring->len, ring->len );
+ ring->desc = malloc_phys ( ring->len, ring->len );
if ( ! ring->desc )
return -ENOMEM;
@@ -553,7 +553,7 @@ void intel_destroy_ring ( struct intel_nic *intel, struct intel_ring *ring ) {
intel_reset_ring ( intel, ring->reg );
/* Free descriptor ring */
- free_dma ( ring->desc, ring->len );
+ free_phys ( ring->desc, ring->len );
ring->desc = NULL;
ring->prod = 0;
ring->cons = 0;