Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp40854iog; Sun, 12 Jun 2022 18:10:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzxwZR8qG7Vn+zXtKfCqqW5JCcY3pPXxGfxdJh15dGpm192fHgouYDuMrU85FGmG9XXUjK X-Received: by 2002:a05:6402:26cf:b0:431:5d99:2142 with SMTP id x15-20020a05640226cf00b004315d992142mr41440424edd.242.1655082633066; Sun, 12 Jun 2022 18:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655082633; cv=none; d=google.com; s=arc-20160816; b=ypS7Rki3L4YXmIo6tFi8bmx85Z/ocY8BKnKvPqoy7DFKjL3pZf6y9o5vZMEkne3jcK kFbXwWmVhuWCwb714y42yGKPcs7WYO9szBO/pqZSaXWUh8gHhv6yDeld/fp7cV8yfsng mpiJnAUxNI5NbEA1NX302Xi3me+O/mMWN7G826PR/DHAFN2yKLxDi+oSZHZcLokN8xHh P1vlQNTTUEGQN6M7FDzEPMeghg6hEJUdSb5cMmh1rX7PRbJZxQu8MILssW0dyKDKu+im VixJYNJ++kM7C+IhkTrEqyBjB0WSXAsI+bqs8eIBZuha0VYzj/J/wqrZMXWrEtvGEWdg a8Rg== 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=g8fpQ3n+ZpzpJa68DZ7a1Xhi4BmyeCkuj+gS/VMo74kCrnlLFRYiHHuAX0ox1TIiMu GnSQPUCoalIvrYHWhq31MIjsfgzLqm/GjaAheLsOSP0eqjq2U1X6edV2ZNfdAI0vnMMR Rk9igqzw1eHtU7MVtzLm1CwWMo5NLBYqACAO7VN9kT5N5AWh+s05oM2Erf4G5tEqn5pW UtYsy0jvClrOhSDDBbFxo987thgj6iQxCyZYXXZGRd5PAUZzVizG/WRmnDWQXuyxCYxA cdF/86fj2ftLf5Pr/4pOwJPlD8a6HoT6GJtqSwCx/GKEQu1ksfWwAT0qDJ7lM8Pus21G sGyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=o72+hOYT; 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 ne29-20020a1709077b9d00b00707a2b7c6d6si7375411ejc.175.2022.06.12.18.10.08; Sun, 12 Jun 2022 18:10:33 -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=o72+hOYT; 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 S234234AbiFLVPc (ORCPT + 99 others); Sun, 12 Jun 2022 17:15:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236091AbiFLVPN (ORCPT ); Sun, 12 Jun 2022 17:15:13 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E3B7590A6; Sun, 12 Jun 2022 14:15:12 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id E87E420C14D1; Sun, 12 Jun 2022 14:15:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E87E420C14D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1655068511; bh=GFhQPUGWrbgZzC2192zgVbA+JDQi/fpd3+vs9e/absk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=o72+hOYTCd1lbQIH7QyoGF6Qjs4uuaHKmE1EVmOR1g1BhphtKg8jN03LBE3BcyIbJ cuqlqK31quek9XzwfwpcXJJVQfDrYMv+uuau3CS49i5XQibIexz/as6fw2FYkJFpvn gJlMBIYwiqF1VQcFtnRNIEvoqaWebcz9RlIqQ/qY= 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 v3 05/12] net: mana: Set the DMA device max segment size Date: Sun, 12 Jun 2022 14:14:47 -0700 Message-Id: <1655068494-16440-6-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1655068494-16440-1-git-send-email-longli@linuxonhyperv.com> References: <1655068494-16440-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