Message ID | 1666034441-15424-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:4ac7:0:0:0:0:0 with SMTP id y7csp1605875wrs; Mon, 17 Oct 2022 12:22:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6h4+H+SR+D3Ihz6g6waDZgRRN8aNAidTBMj7bFkR+2uIzTfgKO0MzSa9kYbBNwT47LbC3O X-Received: by 2002:a17:902:f687:b0:185:4163:3368 with SMTP id l7-20020a170902f68700b0018541633368mr13687083plg.25.1666034532460; Mon, 17 Oct 2022 12:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666034532; cv=none; d=google.com; s=arc-20160816; b=IHspeGcFzqLROO/7qiujk0qGKUU+IyRLKMlL7VI4mhY57MjswPutb5i1bnKtCo982B yh1EOVrNC3DgqJRj6FtPNkopI4wAlLG9bIH2DivQkPgcW65L2vJrzYAtwRJ20DgRyv0k G9JQsu4qJ83QcCxWJA7MjYY284bn3T2sIUSC63mZuF6m9/3nNCfkQiP2hdv1L1EllFM1 /NloucAwi9fnEAFslKN11aKn/dv1JAg8Vk7xSesnuKpZt6UAMANCAu2mZMoUKNil7C3C RqDOJ3o/vue2uOtEwk49ZzMDFvcXgkP5DieAy7w2pnc5/5wTX1lWuauUV8YLzds7+JDG Iduw== 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=JWJW8dsdiWoH5j9Y7mvrIxoVCX+bHlpAGBy//YGUJL8heh0FlceUWlseC0h/LrFOu3 cgWDLczB74EB5Uiu+e5Tcm3hH6oSuoUBqvr1f+IXaKPDaWKOSvzVYZnUIkq+zTwG1Vvl AnmkhO00u5XYS1itNIc2FbGTwOpiY/NPzdBXIvoURasyZmc4IQz3CHd0xJzKruCegPv6 8fTaySQWoI2otxXgmf2SNINJBaALZNZusniDAmis3wVpXHl86JzLxK7q3D0VexFJoVwJ eg+dXwCL3y84f1vckxhBPHIwFzRr3eBxhyc1Sf7FVoL+7cFoo1bKdN4m7emzIMpoGdNy 8zrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=dgkb5TSK; 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 l190-20020a6388c7000000b0046b2ea057e6si9722299pgd.608.2022.10.17.12.21.57; Mon, 17 Oct 2022 12:22:12 -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=dgkb5TSK; 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 S230448AbiJQTVe (ORCPT <rfc822;kernel.ruili@gmail.com> + 99 others); Mon, 17 Oct 2022 15:21:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230507AbiJQTU7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Oct 2022 15:20:59 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3B3F932BAC; Mon, 17 Oct 2022 12:20:53 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id F188420FDA81; Mon, 17 Oct 2022 12:20:52 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F188420FDA81 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1666034452; bh=xJ3JkF6Vcd6GI3PssrAc3ksaEXDp0/3rJi7rJ5ZNs8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=dgkb5TSKZSQBCQO6oVAN+Nd/V+VUPKDFgmUjbGbyqp1iopCvAiHi9V3Mtt2iUGd/n 5diZh2lQtI9Y/XSqUtSqD027LwxN8IKntp7ug3EkkFzuuuAOsiZ7MaOh/iuOOOYyrJ LaUupCeTEymnfCGYV613kSPkIAnmUJQZCQ6g+CbY= 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 v7 04/12] net: mana: Set the DMA device max segment size Date: Mon, 17 Oct 2022 12:20:33 -0700 Message-Id: <1666034441-15424-5-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1666034441-15424-1-git-send-email-longli@linuxonhyperv.com> References: <1666034441-15424-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?1746963825948533226?= X-GMAIL-MSGID: =?utf-8?q?1746963825948533226?= |
Series |
Introduce Microsoft Azure Network Adapter (MANA) RDMA driver
|
|
Commit Message
longli@linuxonhyperv.com
Oct. 17, 2022, 7:20 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)