summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorAjay Sharma <sharmaajay@microsoft.com>2022-11-03 12:16:22 -0700
committerLeon Romanovsky <leonro@nvidia.com>2022-11-10 07:57:26 +0200
commit6fe254160bd033a1e62dbad9b734183b31144678 (patch)
tree60588adc67c6370f61933d6a12274cd7d1a36b7e /drivers/net/ethernet
parentb5c1c9855be3b5b978fde975a63df3cabc273faa (diff)
downloadlinux-6fe254160bd033a1e62dbad9b734183b31144678.tar.bz2
net: mana: Set the DMA device max segment size
MANA hardware doesn't have any restrictions on the DMA segment size, set it to the max allowed value. Signed-off-by: Ajay Sharma <sharmaajay@microsoft.com> Reviewed-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: Long Li <longli@microsoft.com> Link: https://lore.kernel.org/r/1667502990-2559-5-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/microsoft/mana/gdma_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index 9a698526e2a3..62089e112c05 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -1373,6 +1373,12 @@ static int mana_gd_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (err)
goto release_region;
+ err = dma_set_max_seg_size(&pdev->dev, UINT_MAX);
+ if (err) {
+ dev_err(&pdev->dev, "Failed to set dma device segment size\n");
+ goto release_region;
+ }
+
err = -ENOMEM;
gc = vzalloc(sizeof(*gc));
if (!gc)