Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3386053pxm; Mon, 28 Feb 2022 19:13:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxi+boX2g6Lo5gatH1lENepuStU/8bQpKByJOeHYzd9qNaKU8EXBNlj9p6/FDf16GF7+ti/ X-Received: by 2002:aa7:c986:0:b0:413:30cc:cfd8 with SMTP id c6-20020aa7c986000000b0041330cccfd8mr22617351edt.122.1646104405747; Mon, 28 Feb 2022 19:13:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646104405; cv=none; d=google.com; s=arc-20160816; b=q2K0z3KxmNUn0f50R15O80x9nbottYCxaMgVONix70cVgBx+uzSIJQvC5vINnsVgr3 o8/9dCh719bS2Lq5GCnNFsIy0AKlpatjbCXyfn0anIIAFZdahxLHaCqDOCzm9sp7TSga o3MpioAIFsQVZY2zswsBXshIPtSy5cGLPTQ2PIi9CbtU1WNBgeGP8fO+k9Igv5UjFP+S nkp9+aU2gMEcMdCHeZMFFFLHaxVznJvol6wt1gWEMWquMfnKaHHlUN5ishWg+jzdMe82 xmgShixCaYcqpIhdHbG2eHpSV/x3bmYIy0oVpYbu6GJe+jRUrsXxP6S7FNcmQJ5dzac3 pTJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PyFDsjmMKCqCZKwZNSrr3EREFHubLTbckVDLvVietaU=; b=yo3eo5+fzU1a2u11h8VE7f+IO3NiUlZiUfe/7AARfgHgDJUkbPklgXCoYV49MammVN sO9idf/oOCxMQ5EKmrgNA/K8OEqhejZb4D/95IDx0n3FEB23ZH3DPEFQztaWxQjIMmrM cpB+KO9oOgCAtBTbn1Ni2ci16XLOrG3D6pIb/2MzWTdw3BiNruD0Lg6O/X5RbYma2yoj bsRzfpgDgzUY3K7yivyc+RXtBdYsc7TcnwkH8KSlMaZTcqFV4MR8zcsHalzzQnVSFy31 cIDqF15DJkmeAhx5wrKacKaVEsJZbhibXlXQ+Plxrw0gLnK07Lwb3JtTgAw1dOwX50vN VUUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X6mnErHq; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ce28-20020a05640221fc00b0041329ba125bsi7660167edb.359.2022.02.28.19.13.03; Mon, 28 Feb 2022 19:13:25 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=X6mnErHq; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231992AbiCADAs (ORCPT + 99 others); Mon, 28 Feb 2022 22:00:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbiCADAr (ORCPT ); Mon, 28 Feb 2022 22:00:47 -0500 Received: from mail-vk1-xa30.google.com (mail-vk1-xa30.google.com [IPv6:2607:f8b0:4864:20::a30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FFFE64F6; Mon, 28 Feb 2022 19:00:08 -0800 (PST) Received: by mail-vk1-xa30.google.com with SMTP id m195so3632353vka.5; Mon, 28 Feb 2022 19:00:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PyFDsjmMKCqCZKwZNSrr3EREFHubLTbckVDLvVietaU=; b=X6mnErHq65YWhzNZHRlesTamjFZcKlaJLfGucbQoHbCZgZP4nCT0epAPgEh+PSLRN1 +jneDkLI4XuVkBng+8fJ6Q4z+Tm6HLAy1PKzmT/faxWbM2MrR+xEyN7OxrK18NdODol+ XliNc9pSvAAuxPEIpNjwfNAqjxKaY6lJ4gF+uOzS+CfPip9oRbZocx9EApN/BKajjtsl lPe57SpnRVx0+vccfjCIPanLjz802Jqs63UG0gHwp9TDAkVmOTqZm5lUxXwjEhp2M99Z p5BYC6BaAtEjnCGgucM7ThYstqQmCxiSGLxLi7cSuknSDHlrfNWnjzN6MnrSEqcv4jRC H1QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PyFDsjmMKCqCZKwZNSrr3EREFHubLTbckVDLvVietaU=; b=yj58VWY4sv+L54dqdCV43LvP73q+xE7/jIqydV6dlm2VDEZRUaI1fn+nJKcRBWWmky z34j9U5XL/KCVA1cVhVKVHUCiv71BmvuHORe6PrOptDUVTnaZnKOqHPeUgumCPx63Rz8 rRRcZFGboE9i3U6cPnGzkbV3QJ1yJ2znGyigRzrP/HJMJ5kf3QfK3z9xx3GniHEuliZC 1ziqlttru6I8kluuL1gBBDkyc11ieGvdcKNmVDPiHamLqEhuEB4wN9PTMNyMuAfFu8m6 wsIrhIt6HqYCNWM7wmbWegC0RxcMKbnAbV7cklx5/r905rjj3uXfZs57ozI8tWfO9AYm 1AQA== X-Gm-Message-State: AOAM533/BJRLR+a5UvF3Ttz4eyZPOhkaBc/gzJ9ayldH9LWKBRMgHXG5 r1DcKWEESQy+9oWp9AYjaPfQ16UZE3W8Mk/tDAU= X-Received: by 2002:a05:6122:d11:b0:331:2101:1238 with SMTP id az17-20020a0561220d1100b0033121011238mr10015708vkb.22.1646103607142; Mon, 28 Feb 2022 19:00:07 -0800 (PST) MIME-Version: 1.0 References: <20220222042700.385001-1-yusisamerican@gmail.com> <20220225155208.GA1377611@yilunxu-OptiPlex-7050> In-Reply-To: From: Yusuf Khan Date: Mon, 28 Feb 2022 18:59:56 -0800 Message-ID: Subject: Re: [PATCH -next] pga: dfl: pci: Make sure DMA related error check is not done twice To: "Wu, Hao" Cc: "Xu, Yilun" , "linux-kernel@vger.kernel.org" , "linux-fpga@vger.kernel.org" , "mdf@kernel.org" , "trix@redhat.com" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Done. Resent On Mon, Feb 28, 2022 at 6:34 PM Wu, Hao wrote: > > > -----Original Message----- > > From: Yusuf Khan > > Sent: Tuesday, March 1, 2022 9:59 AM > > To: Wu, Hao > > Cc: Xu, Yilun ; linux-kernel@vger.kernel.org; linux- > > fpga@vger.kernel.org; mdf@kernel.org; trix@redhat.com > > Subject: Re: [PATCH -next] pga: dfl: pci: Make sure DMA related error check is > > not done twice > > > > Will do, but I do not know exactly what to remove from the commit message, > > I understand what to do for the title > > > > > > > NOTE: This patch is only for use in the linux-next branch as the > > > > > > commit that caused this bug happened there. > > Remove this NOTE > > Hao > > > > > Yusuf > > > > On Mon, Feb 28, 2022 at 1:58 AM Wu, Hao wrote: > > > > > > > On Mon, Feb 21, 2022 at 08:39:48PM -0800, Yusuf Khan wrote: > > > > > Note: This bug was introduced here: > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux- > > > > next.git/patch/?id=ada3caabaf6135150077c3f729bb06e8f3b5b8f6 > > > > > I saw this commit inside the linux-next branch, it is not present in > > > > > the mainline branch. > > > > > The linux-next branch was last updated 5 days ago, so I am unsure > > > > > about the state of that commit. > > > > > > > > > > On Mon, Feb 21, 2022 at 8:27 PM Yusuf Khan > > > > wrote: > > > > > > > > > > > > In the case that the DMA 64 bit bit mask error check does not fail, > > > > > > the error check will be done twice, this patch fixed that. > > > > > > > > > > > > NOTE: This patch is only for use in the linux-next branch as the > > > > > > commit that caused this bug happened there. > > > > > > Thanks for the patch. > > > please remove this from the commit message, and fix the title > > > s/pga/fpga/ > > > > > > Thanks > > > Hao > > > > > > > > > > > > > > > Signed-off-by: Yusuf Khan > > > > > > --- > > > > > > drivers/fpga/dfl-pci.c | 9 +++++---- > > > > > > 1 file changed, 5 insertions(+), 4 deletions(-) > > > > > > > > > > > > diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c > > > > > > index 717ac9715970..6222f18aed4b 100644 > > > > > > --- a/drivers/fpga/dfl-pci.c > > > > > > +++ b/drivers/fpga/dfl-pci.c > > > > > > @@ -356,11 +356,12 @@ int cci_pci_probe(struct pci_dev *pcidev, const > > > > struct pci_device_id *pcidevid) > > > > > > pci_set_master(pcidev); > > > > > > > > > > > > ret = dma_set_mask_and_coherent(&pcidev->dev, > > DMA_BIT_MASK(64)); > > > > > > - if (ret) > > > > > > - ret = dma_set_mask_and_coherent(&pcidev->dev, > > > > DMA_BIT_MASK(32)); > > > > > > if (ret) { > > > > > > - dev_err(&pcidev->dev, "No suitable DMA support available.\n"); > > > > > > - goto disable_error_report_exit; > > > > > > + ret = dma_set_mask_and_coherent(&pcidev->dev, > > > > DMA_BIT_MASK(32)); > > > > > > + if (ret) { > > > > > > + dev_err(&pcidev->dev, "No suitable DMA support > > > > available.\n"); > > > > > > + goto disable_error_report_exit; > > > > > > + } > > > > > > > > Looks good to me. > > > > > > > > Acked-by: Xu Yilun > > > > > > > > > > } > > > > > > > > > > > > ret = cci_init_drvdata(pcidev); > > > > > > -- > > > > > > 2.25.1 > > > > > >