summaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/main.c
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2023-02-10 17:39:23 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2023-02-13 09:59:50 +0100
commitf28841271f9e1e450f3890d8a33f194b0330fb28 (patch)
treeae1cf8f81fbe9204f326bd3f189fbd6fb0905213 /drivers/net/e1000/main.c
parent6cfc41e3dd056f255459d78b0f686e2af9fc931c (diff)
downloadbarebox-f28841271f9e1e450f3890d8a33f194b0330fb28.tar.gz
barebox-f28841271f9e1e450f3890d8a33f194b0330fb28.tar.xz
net: e1000: properly map dma allocations
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Denis Orlov <denorl2009@gmail.com> Link: https://lore.barebox.org/20230210143924.915149-2-denorl2009@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net/e1000/main.c')
-rw-r--r--drivers/net/e1000/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index e00bc48417..c259d72f27 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -3267,7 +3267,7 @@ static void e1000_configure_tx(struct e1000_hw *hw)
unsigned long tctl;
unsigned long tipg, tarc;
uint32_t ipgr1, ipgr2;
- const unsigned long tx_base = (unsigned long)hw->tx_base;
+ const unsigned long tx_base = (unsigned long)hw->tx_base_phys;
e1000_write_reg(hw, E1000_TDBAL, lower_32_bits(tx_base));
e1000_write_reg(hw, E1000_TDBAH, upper_32_bits(tx_base));
@@ -3386,7 +3386,7 @@ static void e1000_setup_rctl(struct e1000_hw *hw)
static void e1000_configure_rx(struct e1000_hw *hw)
{
unsigned long rctl, ctrl_ext;
- const unsigned long rx_base = (unsigned long)hw->rx_base;
+ const unsigned long rx_base = (unsigned long)hw->rx_base_phys;
hw->rx_tail = 0;
/* make sure receives are disabled while setting up the descriptors */
@@ -3595,8 +3595,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *id)
hw = xzalloc(sizeof(*hw));
- hw->tx_base = dma_alloc_coherent(16 * sizeof(*hw->tx_base), DMA_ADDRESS_BROKEN);
- hw->rx_base = dma_alloc_coherent(16 * sizeof(*hw->rx_base), DMA_ADDRESS_BROKEN);
+ hw->tx_base = dma_alloc_coherent(16 * sizeof(*hw->tx_base), &hw->tx_base_phys);
+ hw->rx_base = dma_alloc_coherent(16 * sizeof(*hw->rx_base), &hw->rx_base_phys);
edev = &hw->edev;