Skip to content

Commit d0fa064

Browse files
kvmajomarckleinebudde
authored andcommitted
can: kvaser_pciefd: Enable 64-bit DMA addressing
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 <[email protected]> Link: https://patch.msgid.link/d7340f78e3db305bfeeb8229d2dd1c9077e10b92.1725875278.git.martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 75b3189 commit d0fa064

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/can/kvaser_pciefd.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,9 @@ static int kvaser_pciefd_setup_dma(struct kvaser_pciefd *pcie)
11041104

11051105
/* Disable the DMA */
11061106
iowrite32(0, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CTRL_REG);
1107+
1108+
dma_set_mask_and_coherent(&pcie->pci->dev, DMA_BIT_MASK(64));
1109+
11071110
for (i = 0; i < KVASER_PCIEFD_DMA_COUNT; i++) {
11081111
pcie->dma_data[i] = dmam_alloc_coherent(&pcie->pci->dev,
11091112
KVASER_PCIEFD_DMA_SIZE,

0 commit comments

Comments
 (0)