aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/net/eepro100.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2020-11-05 19:08:48 +0000
committerMichael Brown <mcb30@ipxe.org>2020-11-05 19:13:52 +0000
commitbe1c87b72237f633c4f4b05bcb133acf2967d788 (patch)
treeadc9bc36da62d55f0f1f5708af7c66d1cc3af949 /src/drivers/net/eepro100.c
parent36dde9b0bf27ae411af677ca1fa3075113133cfe (diff)
downloadipxe-be1c87b72237f633c4f4b05bcb133acf2967d788.tar.gz
[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/eepro100.c')
-rw-r--r--src/drivers/net/eepro100.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/drivers/net/eepro100.c b/src/drivers/net/eepro100.c
index 1046cda39..1a802b590 100644
--- a/src/drivers/net/eepro100.c
+++ b/src/drivers/net/eepro100.c
@@ -93,7 +93,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
/*
* Debugging levels:
- * - DBG() is for any errors, i.e. failed alloc_iob(), malloc_dma(),
+ * - DBG() is for any errors, i.e. failed alloc_iob(), malloc_phys(),
* TX overflow, corrupted packets, ...
* - DBG2() is for successful events, like packet received,
* packet transmitted, and other general notifications.
@@ -335,7 +335,7 @@ static int ifec_net_open ( struct net_device *netdev )
ifec_mdio_setup ( netdev, options );
/* Prepare MAC address w/ Individual Address Setup (ias) command.*/
- ias = malloc_dma ( sizeof ( *ias ), CB_ALIGN );
+ ias = malloc_phys ( sizeof ( *ias ), CB_ALIGN );
if ( !ias ) {
rc = -ENOMEM;
goto error;
@@ -345,7 +345,7 @@ static int ifec_net_open ( struct net_device *netdev )
memcpy ( ias->ia, netdev->ll_addr, ETH_ALEN );
/* Prepare operating parameters w/ a configure command. */
- cfg = malloc_dma ( sizeof ( *cfg ), CB_ALIGN );
+ cfg = malloc_phys ( sizeof ( *cfg ), CB_ALIGN );
if ( !cfg ) {
rc = -ENOMEM;
goto error;
@@ -367,8 +367,8 @@ static int ifec_net_open ( struct net_device *netdev )
DBG ( "Failed to initiate!\n" );
goto error;
}
- free_dma ( ias, sizeof ( *ias ) );
- free_dma ( cfg, sizeof ( *cfg ) );
+ free_phys ( ias, sizeof ( *ias ) );
+ free_phys ( cfg, sizeof ( *cfg ) );
DBG2 ( "cfg " );
/* Enable rx by sending ring address to card */
@@ -381,8 +381,8 @@ static int ifec_net_open ( struct net_device *netdev )
return 0;
error:
- free_dma ( cfg, sizeof ( *cfg ) );
- free_dma ( ias, sizeof ( *ias ) );
+ free_phys ( cfg, sizeof ( *cfg ) );
+ free_phys ( ias, sizeof ( *ias ) );
ifec_free ( netdev );
ifec_reset ( netdev );
return rc;
@@ -703,7 +703,7 @@ static void ifec_free ( struct net_device *netdev )
}
/* free TX ring buffer */
- free_dma ( priv->tcbs, TX_RING_BYTES );
+ free_phys ( priv->tcbs, TX_RING_BYTES );
priv->tcbs = NULL;
}
@@ -1025,7 +1025,7 @@ static int ifec_tx_setup ( struct net_device *netdev )
DBGP ( "ifec_tx_setup\n" );
/* allocate tx ring */
- priv->tcbs = malloc_dma ( TX_RING_BYTES, CB_ALIGN );
+ priv->tcbs = malloc_phys ( TX_RING_BYTES, CB_ALIGN );
if ( !priv->tcbs ) {
DBG ( "TX-ring allocation failed\n" );
return -ENOMEM;