]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Octeontx2-af: RPM: Update DMA mask
authorHariprasad Kelam <hkelam@marvell.com>
Sun, 20 Jul 2025 16:36:37 +0000 (22:06 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 22 Jul 2025 13:36:39 +0000 (15:36 +0200)
CGX/RPM driver supports 48 bits of DMA addressing. Update
the DMA mask accordingly.

Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250720163638.1560323-4-hkelam@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/marvell/octeontx2/af/cgx.c

index cd6c5229d0eddbf393d4e7facb461d0bd2cffc09..ab5838865c3f875c074248a0a9c7595115147d83 100644 (file)
@@ -1964,6 +1964,12 @@ static int cgx_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                goto err_disable_device;
        }
 
+       err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48));
+       if (err) {
+               dev_err(dev, "DMA mask config failed, abort\n");
+               goto err_release_regions;
+       }
+
        /* MAP configuration registers */
        cgx->reg_base = pcim_iomap(pdev, PCI_CFG_REG_BAR_NUM, 0);
        if (!cgx->reg_base) {