Message ID | 1667502990-2559-5-git-send-email-longli@linuxonhyperv.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp720458wru; Thu, 3 Nov 2022 12:18:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6XK8VpyDPUEgZ1dAAntFLVFfcOHxacXVt8n/DwOgHoqPFNXsKM2AuJ+5KRFGON9wU5hKnb X-Received: by 2002:a17:90b:238f:b0:213:f73e:751d with SMTP id mr15-20020a17090b238f00b00213f73e751dmr20549881pjb.1.1667503129568; Thu, 03 Nov 2022 12:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667503129; cv=none; d=google.com; s=arc-20160816; b=Ka0WuJG36G1KlNr6xKshfJvKdtDmRPrMB2BcYCCDZ6FOOUcUpLvFUrU3427XwbgUg+ fBLH+HZ3Iuz+zJRogJXTB4dm3QITFYqDsIUEDV0WOspfgVoB+c9KNman8ZAjar3mRMe6 LxvpuawzVOMroUgnfPhP+pae8pt8JB69jyvzIVh2bosvHo9bmXnmrOOEyx8Uf5irvFYn X8V3juSGZZndgn1SFb6qOSHb9UKsgSKOz9cB2guyVVHEmkMudWqcLz7EDkUCeaOnkATQ EZdD2tfiyrVgBLvBleaCNzcr8hbcWG4BzQvwa9DW56Qu9vg+yVZR5ovuuAp7XV+6UOiA 7o/Q== 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=xJ3JkF6Vcd6GI3PssrAc3ksaEXDp0/3rJi7rJ5ZNs8A=; b=bvh3nuwWpkN5aVCdmY/92gS8KjeTxFF0f9sZV4EnTsbru8isHOA6q4v6N/r9B5Uyyy ScKWN5PnC9UvxJHjVuY+KpSgS88hLuDL/4U8hUABGzeADMmLctiuBRY/EfWMLqClJS+s orX8pCIF9tB31IOIVx4kg1bsozjn80RXLSOQUrOPysLUeCUw7CPz2+sJhhcbpLY/LG5p F7E0vFwcWXVmUiT3i6UNyhePXnw2/eQlxu/l2ezghjRvjrmwMzFNOEsiS5ezIKlUfeQh EUax8KreWEL1Gg67YhGQniuA0CD2h2wOGgyAE7lTi60JOcY0o5HVSfIPxYb5HuHd12zi Zisw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=JJH8IJBN; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a17090a2e0a00b00213f8a9fd79si725161pjd.130.2022.11.03.12.18.35; Thu, 03 Nov 2022 12:18:49 -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=JJH8IJBN; 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 S231561AbiKCTRl (ORCPT <rfc822;yves.mi.zy@gmail.com> + 99 others); Thu, 3 Nov 2022 15:17:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbiKCTQ5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 3 Nov 2022 15:16:57 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D26F01F9F1; Thu, 3 Nov 2022 12:16:55 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id AA09220C28BD; Thu, 3 Nov 2022 12:16:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AA09220C28BD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1667503015; bh=xJ3JkF6Vcd6GI3PssrAc3ksaEXDp0/3rJi7rJ5ZNs8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=JJH8IJBNl/FjcKuA9yvY+cV1DPYUL2dk5PoLbZqC457sepjgZ6ZqvokQZuzQ8MqN1 ex96W4wV9oLxFRI+jAtBcBQk0zdJpbkEN3lZ1sRbFwHi6qs2TD44Ec0pcyYAsE33f/ CtNRPqOI5cbwqbeCMdjhK3U22wkFs80mgfa200XY= From: longli@linuxonhyperv.com To: "K. Y. Srinivasan" <kys@microsoft.com>, Haiyang Zhang <haiyangz@microsoft.com>, Stephen Hemminger <sthemmin@microsoft.com>, Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>, edumazet@google.com, shiraz.saleem@intel.com, Ajay Sharma <sharmaajay@microsoft.com> Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Long Li <longli@microsoft.com> Subject: [Patch v10 04/12] net: mana: Set the DMA device max segment size Date: Thu, 3 Nov 2022 12:16:22 -0700 Message-Id: <1667502990-2559-5-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1667502990-2559-1-git-send-email-longli@linuxonhyperv.com> References: <1667502990-2559-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,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748503761555867119?= X-GMAIL-MSGID: =?utf-8?q?1748503761555867119?= |
Series |
Introduce Microsoft Azure Network Adapter (MANA) RDMA driver
|
|
Commit Message
longli@linuxonhyperv.com
Nov. 3, 2022, 7:16 p.m. UTC
From: Ajay Sharma <sharmaajay@microsoft.com> 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> Acked-by: Haiyang Zhang <haiyangz@microsoft.com> --- 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 0cfe5f15458e..4f041b27c07d 100644 --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c @@ -1363,6 +1363,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)