From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
kernel@pengutronix.de, Martin Jocic <martin.jocic@kvaser.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net 3/5] can: kvaser_pciefd: Enable 64-bit DMA addressing
Date: Thu, 12 Sep 2024 09:50:52 +0200 [thread overview]
Message-ID: <20240912075804.2825408-4-mkl@pengutronix.de> (raw)
In-Reply-To: <20240912075804.2825408-1-mkl@pengutronix.de>
From: Martin Jocic <martin.jocic@kvaser.com>
Enabling 64-bit addressing for DMA buffers will prevent issues
on some memory constrained platforms like e.g. Raspberry Pi 5,
where the driver won't load because it cannot allocate enough
continuous memory in the default 32-bit memory address range.
Signed-off-by: Martin Jocic <martin.jocic@kvaser.com>
Link: https://patch.msgid.link/d7340f78e3db305bfeeb8229d2dd1c9077e10b92.1725875278.git.martin.jocic@kvaser.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/kvaser_pciefd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c
index 9ffc3ffb4e8f..f86c9671a03a 100644
--- a/drivers/net/can/kvaser_pciefd.c
+++ b/drivers/net/can/kvaser_pciefd.c
@@ -1104,6 +1104,9 @@ static int kvaser_pciefd_setup_dma(struct kvaser_pciefd *pcie)
/* Disable the DMA */
iowrite32(0, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CTRL_REG);
+
+ dma_set_mask_and_coherent(&pcie->pci->dev, DMA_BIT_MASK(64));
+
for (i = 0; i < KVASER_PCIEFD_DMA_COUNT; i++) {
pcie->dma_data[i] = dmam_alloc_coherent(&pcie->pci->dev,
KVASER_PCIEFD_DMA_SIZE,
--
2.45.2
next prev parent reply other threads:[~2024-09-12 8:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 7:50 [PATCH net 0/5] pull-request: can 2024-09-12 Marc Kleine-Budde
2024-09-12 7:50 ` [PATCH net 1/5] can: bcm: Clear bo->bcm_proc_read after remove_proc_entry() Marc Kleine-Budde
2024-09-14 4:30 ` patchwork-bot+netdevbpf
2024-09-14 4:50 ` patchwork-bot+netdevbpf
2024-09-12 7:50 ` [PATCH net 2/5] can: esd_usb: Remove CAN_CTRLMODE_3_SAMPLES for CAN-USB/3-FD Marc Kleine-Budde
2024-09-12 7:50 ` Marc Kleine-Budde [this message]
2024-09-12 7:50 ` [PATCH net 4/5] can: m_can: enable NAPI before enabling interrupts Marc Kleine-Budde
2024-09-14 4:30 ` patchwork-bot+netdevbpf
2024-09-12 7:50 ` [PATCH net 5/5] can: m_can: m_can_close(): stop clocks after device has been shut down Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240912075804.2825408-4-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=martin.jocic@kvaser.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox