Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4692158rwb; Tue, 20 Sep 2022 18:49:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6UripP9RodBpWlM0tFt2KTSmLB529SyeKWkWkIbTTbWyZm+HzVbX6ETDnSat7NSJlVCNN3 X-Received: by 2002:a17:907:1c9b:b0:77c:59aa:c016 with SMTP id nb27-20020a1709071c9b00b0077c59aac016mr19575037ejc.152.1663724996941; Tue, 20 Sep 2022 18:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663724996; cv=none; d=google.com; s=arc-20160816; b=RGjMXVKlzQv8lwG1fM2LvfjgAmqAUduyz4uMFO9sskQV5g9kc6mj+JChmbELJ0dmFC Je6lfyjxSbg4ITHsZsTzjcoyQmiXHxX1Tm+NwNHUg85Do5yTdWsDu9Orq7wtzVc7y+np 9/Zoa4AcppsZim8ByU2JlbfMHiKygFWQy01a7i+VD8TiZ3MY9z5a/xJkxUglRmBr+yGW 1pbo8lLSyyZT4yf3yOKwf5VYQFV80jDyPXh0CHF2prgMOLQ1+/mtJbSbtGRV+ehXRO/W zOJtZ4Iu7y8Csoly/tghOEHK8JAQrWvRIRIQhSsYq4l5D/lFROJIysbc1KIbtOn0RrjU TP2A== 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=NDaRbD4cdcYHkNYVJR8L9jq/M1A5SIHCbhCil+aZemo=; b=EZ9eZcgDNNOGq9FDoxSV9KCp8R6KTC+SjsBWXAEUYbTBQlj0hLv0FJ+nHN8WmaOhgs dSCr6qdsMTJ/igjfUPKgFNHj3x4Y81Cf3Z+so/czP91slpwpiflW1RvquOMciULJ9oC/ triRqOP0q/tED37QFGlRF1yGD8+6UGqHRHYPgAhIb0AtzCAG4ej9sDBjAFyhpH8Nrak7 cnZ29kNSdp2iO3dtH3jBuFrOlmSdPhm+6BL5jsA+ejiX52+XhJuKdZeRyYx9DUVVniXT 3hmvfWEn4vAjATvGxus5h0ssVnTAlIL5FzM8XJzx5hf+szHkHiJxP/cbKOZWzxEcHHAp Vj8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=VubkcmE0; 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 d6-20020a50cd46000000b0044900e60983si964251edj.541.2022.09.20.18.49.31; Tue, 20 Sep 2022 18:49:56 -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=VubkcmE0; 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 S231543AbiIUBXV (ORCPT + 99 others); Tue, 20 Sep 2022 21:23:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231371AbiIUBXE (ORCPT ); Tue, 20 Sep 2022 21:23:04 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 200717B281; Tue, 20 Sep 2022 18:23:01 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id 6A2AE20B92A0; Tue, 20 Sep 2022 18:23:00 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6A2AE20B92A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1663723380; bh=NDaRbD4cdcYHkNYVJR8L9jq/M1A5SIHCbhCil+aZemo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=VubkcmE0/0+35sKQEB4UpT0wGqoW184NZDfamVX/polclFyut09vDIiepRVyKRELT 6OiV/n3gvuG/jIeuQZNDMpnE9Nzvv0MxN8n1D2jCoeHG73WTllqzr59zGrOJ0GCg/k 25pbFY/VJbjQSYsd0kl4f3U461azehFQBCCJBksc= 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 v6 05/12] net: mana: Set the DMA device max segment size Date: Tue, 20 Sep 2022 18:22:25 -0700 Message-Id: <1663723352-598-6-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1663723352-598-1-git-send-email-longli@linuxonhyperv.com> References: <1663723352-598-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: 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 Reviewed-by: Dexuan Cui Signed-off-by: Long Li Acked-by: Haiyang Zhang --- 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 63544ca9e238..b44548136027 100644 --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c @@ -1419,6 +1419,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