diff options
| author | Michael Brown | 2020-11-05 20:08:48 +0100 |
|---|---|---|
| committer | Michael Brown | 2020-11-05 20:13:52 +0100 |
| commit | be1c87b72237f633c4f4b05bcb133acf2967d788 (patch) | |
| tree | adc9bc36da62d55f0f1f5708af7c66d1cc3af949 /src/drivers/net/sis190.c | |
| parent | [efi] Retain a long-lived reference to the EFI_PCI_IO_PROTOCOL instance (diff) | |
| download | ipxe-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/sis190.c')
| -rw-r--r-- | src/drivers/net/sis190.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/net/sis190.c b/src/drivers/net/sis190.c index 11dda1c97..0e4f0762e 100644 --- a/src/drivers/net/sis190.c +++ b/src/drivers/net/sis190.c @@ -552,7 +552,7 @@ static int sis190_open(struct net_device *dev) int rc; /* Allocate TX ring */ - tp->TxDescRing = malloc_dma(TX_RING_BYTES, RING_ALIGNMENT); + tp->TxDescRing = malloc_phys(TX_RING_BYTES, RING_ALIGNMENT); if (!tp->TxDescRing) { DBG("sis190: TX ring allocation failed\n"); rc = -ENOMEM; @@ -561,7 +561,7 @@ static int sis190_open(struct net_device *dev) tp->tx_dma = cpu_to_le32(virt_to_bus(tp->TxDescRing)); /* Allocate RX ring */ - tp->RxDescRing = malloc_dma(RX_RING_BYTES, RING_ALIGNMENT); + tp->RxDescRing = malloc_phys(RX_RING_BYTES, RING_ALIGNMENT); if (!tp->RxDescRing) { DBG("sis190: RX ring allocation failed\n"); rc = -ENOMEM; @@ -600,8 +600,8 @@ static void sis190_free(struct net_device *dev) struct sis190_private *tp = netdev_priv(dev); int i; - free_dma(tp->TxDescRing, TX_RING_BYTES); - free_dma(tp->RxDescRing, RX_RING_BYTES); + free_phys(tp->TxDescRing, TX_RING_BYTES); + free_phys(tp->RxDescRing, RX_RING_BYTES); tp->TxDescRing = NULL; tp->RxDescRing = NULL; |
