summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/3c90x.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/3c90x.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/3c90x.c')
-rw-r--r--src/drivers/net/3c90x.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/net/3c90x.c b/src/drivers/net/3c90x.c
index 853de2b52..63e07777f 100644
--- a/src/drivers/net/3c90x.c
+++ b/src/drivers/net/3c90x.c
@@ -249,7 +249,7 @@ static int a3c90x_setup_tx_ring(struct INF_3C90X *p)
{
DBGP("a3c90x_setup_tx_ring\n");
p->tx_ring =
- malloc_dma(TX_RING_SIZE * sizeof(struct TXD), TX_RING_ALIGN);
+ malloc_phys(TX_RING_SIZE * sizeof(struct TXD), TX_RING_ALIGN);
if (!p->tx_ring) {
DBG("Could not allocate TX-ring\n");
@@ -304,7 +304,7 @@ static void a3c90x_free_tx_ring(struct INF_3C90X *p)
{
DBGP("a3c90x_free_tx_ring\n");
- free_dma(p->tx_ring, TX_RING_SIZE * sizeof(struct TXD));
+ free_phys(p->tx_ring, TX_RING_SIZE * sizeof(struct TXD));
p->tx_ring = NULL;
/* io_buffers are free()ed by netdev_tx_complete[,_err]() */
}
@@ -461,7 +461,7 @@ static int a3c90x_setup_rx_ring(struct INF_3C90X *p)
DBGP("a3c90x_setup_rx_ring\n");
p->rx_ring =
- malloc_dma(RX_RING_SIZE * sizeof(struct RXD), RX_RING_ALIGN);
+ malloc_phys(RX_RING_SIZE * sizeof(struct RXD), RX_RING_ALIGN);
if (!p->rx_ring) {
DBG("Could not allocate RX-ring\n");
@@ -491,7 +491,7 @@ static void a3c90x_free_rx_ring(struct INF_3C90X *p)
{
DBGP("a3c90x_free_rx_ring\n");
- free_dma(p->rx_ring, RX_RING_SIZE * sizeof(struct RXD));
+ free_phys(p->rx_ring, RX_RING_SIZE * sizeof(struct RXD));
p->rx_ring = NULL;
}