[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220817193017.44063-5-gerhard@engleder-embedded.com>
Date: Wed, 17 Aug 2022 21:30:16 +0200
From: Gerhard Engleder <gerhard@...leder-embedded.com>
To: davem@...emloft.net, kuba@...nel.org
Cc: netdev@...r.kernel.org,
Gerhard Engleder <gerhard@...leder-embedded.com>
Subject: [PATCH net-next 4/5] tsnep: Support full DMA mask
DMA addresses up to 64bit are supported by the device. Configure DMA
mask according to the capabilities of the device.
Signed-off-by: Gerhard Engleder <gerhard@...leder-embedded.com>
---
drivers/net/ethernet/engleder/tsnep_main.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c
index 9f8ca6d9a010..415ae6a4b32c 100644
--- a/drivers/net/ethernet/engleder/tsnep_main.c
+++ b/drivers/net/ethernet/engleder/tsnep_main.c
@@ -1239,6 +1239,13 @@ static int tsnep_probe(struct platform_device *pdev)
adapter->queue[0].rx = &adapter->rx[0];
adapter->queue[0].irq_mask = ECM_INT_TX_0 | ECM_INT_RX_0;
+ retval = dma_set_mask_and_coherent(&adapter->pdev->dev,
+ DMA_BIT_MASK(64));
+ if (retval) {
+ dev_err(&adapter->pdev->dev, "no usable DMA configuration.\n");
+ return retval;
+ }
+
tsnep_disable_irq(adapter, ECM_INT_ALL);
retval = devm_request_irq(&adapter->pdev->dev, adapter->irq, tsnep_irq,
0, TSNEP, adapter);
--
2.30.2
Powered by blists - more mailing lists