Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1045960iog; Wed, 15 Jun 2022 19:24:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tz45FGiyFEkSLko6bgz5re7fYAk1Dq28tL/rXJz8VYp8AEzhrUvl1tzAGbQb1FNRXMsHZd X-Received: by 2002:a17:90a:c981:b0:1e6:75f0:d4f1 with SMTP id w1-20020a17090ac98100b001e675f0d4f1mr2663761pjt.62.1655346254420; Wed, 15 Jun 2022 19:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655346254; cv=none; d=google.com; s=arc-20160816; b=q5ZJu6cdbkkU4AA2jPlvpRHUR0CMAocK5sN7hk4hyPjkT5i80m2rjTK6aMAb6p0LNd 6c5WIR11VEDfMst3rP6DmfPiri5jAtzPp0mux9le1cszfSCgNk/jPqK12RZUHLIXMgbu ft5QFk4fBJXxnwd0Vy/bqGKdVNgGfllRO+vF++EOBPsHoPwkcneX1G6AQnMobG5iVVae ngJf28wz14iI9mqaH/Lfm0GC1GJ6lYBoqBZj7tkV84RXbDqMvuGgIaNdzOF9BMfswyxB 7pa6nCuSNQBsK3KMEhnWxrg4a+3OyoyM1btd7OI8A3qXgH1zRCglJNKtMLjSbwaePSKL 2iKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:reply-to:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=GFhQPUGWrbgZzC2192zgVbA+JDQi/fpd3+vs9e/absk=; b=CQAoA+V8ViXfRQocd6h1cH6haL+JM3eYjIgh796LyYI6MbUrcu4YEPS3Ca1NOcnZpP RpvUXMzLxtED25kRJLM++DDXGMib6JH1Tzpwfi5+IGiGMsPGhK+mjryX8l3EEIa+MqTh VXep0x9nqN67B6Wye8V3wfjWQBiqwF15iyNSMR0cImVRLTHKqPGH7RJ5dkdsxe3v+yaa 9E+A1bcffLCSsvYXRHRKKXOPBaZAqn7h1bAw89oxcOPhdJqlRkr2qxl7IarpZgZZL0Vg kmH5PmCkRfv4vgam/u5ohBz8cZHI9naT8db7B8KdWogdFZ5ILLycCb2kyHnVH4B25CBn BOCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=nJ9m7E3K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxonhyperv.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t31-20020a63445f000000b003fcb1baaf06si950846pgk.163.2022.06.15.19.24.02; Wed, 15 Jun 2022 19:24:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=nJ9m7E3K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxonhyperv.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358454AbiFPCIG (ORCPT + 99 others); Wed, 15 Jun 2022 22:08:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350931AbiFPCHj (ORCPT ); Wed, 15 Jun 2022 22:07:39 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9FC522BCB; Wed, 15 Jun 2022 19:07:37 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id 7036F20C32A1; Wed, 15 Jun 2022 19:07:31 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7036F20C32A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1655345251; bh=GFhQPUGWrbgZzC2192zgVbA+JDQi/fpd3+vs9e/absk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=nJ9m7E3K39DIqaR+h1fzd2wmq96DzH2YMhF7YYXoxeXqJXMxmyi+TnasUYbKAi7sz zeNuy0rF++RTkLq21K6CaanUvnKq5zoje2a+GMC/Q8UEbHkME2H5Us4dDO5wRQPVTD 1QzAMKoC0sSBZCaTFXlLFhSsDLjIFdcABdY+wGQQ= From: longli@linuxonhyperv.com To: "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Jason Gunthorpe , Leon Romanovsky , edumazet@google.com, shiraz.saleem@intel.com, Ajay Sharma Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Long Li Subject: [Patch v4 05/12] net: mana: Set the DMA device max segment size Date: Wed, 15 Jun 2022 19:07:13 -0700 Message-Id: <1655345240-26411-6-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1655345240-26411-1-git-send-email-longli@linuxonhyperv.com> References: <1655345240-26411-1-git-send-email-longli@linuxonhyperv.com> Reply-To: longli@microsoft.com X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ajay Sharma MANA hardware doesn't have any restrictions on the DMA segment size, set it to the max allowed value. Signed-off-by: Ajay Sharma Signed-off-by: Long Li --- Change log: v2: Use the max allowed value as the hardware doesn't have any limit drivers/net/ethernet/microsoft/mana/gdma_main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c index 7b42b78b7ddf..0c38c9a539f9 100644 --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c @@ -1387,6 +1387,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) -- 2.17.1