Message ID | 1666396889-31288-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:4242:0:0:0:0:0 with SMTP id s2csp960157wrr; Fri, 21 Oct 2022 17:03:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5DDJMP77vcOBjMpMI8qZwZx64eIHtkK45knI4C1hLSSagwTFpyZymn35smMhPF0pwpPobk X-Received: by 2002:a17:907:3da2:b0:78d:51c4:5b80 with SMTP id he34-20020a1709073da200b0078d51c45b80mr17523937ejc.716.1666397035151; Fri, 21 Oct 2022 17:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666397035; cv=none; d=google.com; s=arc-20160816; b=jP8YgEj6NGOniunlB92ZZpxufQmNANl2fiGHH1dqZszId1hhYJJkKP+IYgLpjOG8zM YBITEiILn07TMF9ci+n1qV+RIqBgap/3M0yeoSZqZzCltceOSL0bfRUaNAhgSU3ziPZI rG3X7M4RvMRrOgyxLsNcyMuBOfYrwFjSeYN731fpnHrx1PGsFl2Qy7F/knR3jDhobM6Q 3H7Uhxt3vw70Po3M98SO2VA+HSRkGfPBRFTKIc56Uxrocb4gzFgflALX/AAD5CusUb2N OE0EBQFGGgd9Dg8WSD5VNhHalyiLBSeY9MjE/0aOVbbQRiy0wDAI3zPK01a8Rt9ZY6iL WhYA== 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=Mwp7GoeCFhDTGi1JbvqoKIEUHVbZOfZ0uzb4wYWSG1vm+qZRF9JI/f9SgUoavaeXD5 1Pw0WEAQZHXe+k58qhVzXMPVab6kkY+fzPXKiyOm7RnSymmkE8S8hAFR9knpaxfbj5x/ lCZXj0BUO3MrXArgv7yBBDCQoYNqooPHPuYrjzep3+Z8rHXr4QzvK7mK835iMIgmCz1V dOYO07MQ0yuu92RiD9lFVYCyhB7ZBY/TRRdjSa7cpBMdQwJkZXFp868lZJnvtP9X5kCK 15kchQs4Ap5Aeofu4QVPEWctpc+b/USZa8PUIeyl42P8eNwmdtiTYJurcUdEJwogUPDZ iWZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=PvtffB6A; 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 a7-20020a50e707000000b00459039258b2si18702872edn.289.2022.10.21.17.03.30; Fri, 21 Oct 2022 17:03:55 -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=PvtffB6A; 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 S230004AbiJVACK (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Fri, 21 Oct 2022 20:02:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229982AbiJVABo (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 21 Oct 2022 20:01:44 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 24ABD2502AC; Fri, 21 Oct 2022 17:01:39 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id EB94820FEEFC; Fri, 21 Oct 2022 17:01:38 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EB94820FEEFC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1666396898; bh=xJ3JkF6Vcd6GI3PssrAc3ksaEXDp0/3rJi7rJ5ZNs8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=PvtffB6AzfZBpRbMiRIe8PyWTUfntZzirWGSjKNdRnwZdeHcQzoE7iUTdZsZ7UZ4I ZPy804DI3tAo609zQQGL6fPVkTpRm10c/YmUxP3kyFmWG7w3yLSwFQ3oUHc4WTZrBl web5BG6mUnE66OCFWFQjKGFl1nYpXjZL5zc2Ad+I= 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 v9 04/12] net: mana: Set the DMA device max segment size Date: Fri, 21 Oct 2022 17:01:21 -0700 Message-Id: <1666396889-31288-5-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1666396889-31288-1-git-send-email-longli@linuxonhyperv.com> References: <1666396889-31288-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?1747343937391240257?= X-GMAIL-MSGID: =?utf-8?q?1747343937391240257?= |
Series |
Introduce Microsoft Azure Network Adapter (MANA) RDMA driver
|
|
Commit Message
longli@linuxonhyperv.com
Oct. 22, 2022, 12:01 a.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)