aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/net/b44.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/b44.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/b44.c')
-rw-r--r--src/drivers/net/b44.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/drivers/net/b44.c b/src/drivers/net/b44.c
index e0e6f4642..eaf6d35ce 100644
--- a/src/drivers/net/b44.c
+++ b/src/drivers/net/b44.c
@@ -436,7 +436,7 @@ static void b44_free_rx_ring(struct b44_private *bp)
free_iob(bp->rx_iobuf[i]);
bp->rx_iobuf[i] = NULL;
}
- free_dma(bp->rx, B44_RX_RING_LEN_BYTES);
+ free_phys(bp->rx, B44_RX_RING_LEN_BYTES);
bp->rx = NULL;
}
}
@@ -446,11 +446,11 @@ static int b44_init_rx_ring(struct b44_private *bp)
{
b44_free_rx_ring(bp);
- bp->rx = malloc_dma(B44_RX_RING_LEN_BYTES, B44_DMA_ALIGNMENT);
+ bp->rx = malloc_phys(B44_RX_RING_LEN_BYTES, B44_DMA_ALIGNMENT);
if (!bp->rx)
return -ENOMEM;
if (!b44_address_ok(bp->rx)) {
- free_dma(bp->rx, B44_RX_RING_LEN_BYTES);
+ free_phys(bp->rx, B44_RX_RING_LEN_BYTES);
return -ENOTSUP;
}
@@ -468,7 +468,7 @@ static int b44_init_rx_ring(struct b44_private *bp)
static void b44_free_tx_ring(struct b44_private *bp)
{
if (bp->tx) {
- free_dma(bp->tx, B44_TX_RING_LEN_BYTES);
+ free_phys(bp->tx, B44_TX_RING_LEN_BYTES);
bp->tx = NULL;
}
}
@@ -478,11 +478,11 @@ static int b44_init_tx_ring(struct b44_private *bp)
{
b44_free_tx_ring(bp);
- bp->tx = malloc_dma(B44_TX_RING_LEN_BYTES, B44_DMA_ALIGNMENT);
+ bp->tx = malloc_phys(B44_TX_RING_LEN_BYTES, B44_DMA_ALIGNMENT);
if (!bp->tx)
return -ENOMEM;
if (!b44_address_ok(bp->tx)) {
- free_dma(bp->tx, B44_TX_RING_LEN_BYTES);
+ free_phys(bp->tx, B44_TX_RING_LEN_BYTES);
return -ENOTSUP;
}