From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 346F7C433E0 for ; Tue, 7 Jul 2020 14:51:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00AB1206DF for ; Tue, 7 Jul 2020 14:51:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="COdS1jmq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00AB1206DF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ewq7dDAQIy2XoHEVHSDFWfbZh6AF78qNZALcOUjp0O0=; b=COdS1jmqjIyryY9dvoNhLcS+G 1FuKsoB+VlLzcLcMuiNIbdXEAwRMr/OVRqi4DHI5PlyR31/bs9NBToI8B8dR3eLbra7yIXxJ1ADoJ jkTU2o91rFRjJLUhT5ITLgcY6+QdoSKq7EfJm1xiRZEzMmIjGXgeuQDBdefr1gGzrvFxIZJEzDqRN 2rmkouq+Ck/Bwl3++tnIvFjhEk5oURj1CcM3bucYZ7AjhIxZ02Id6hZU99AQ6xx4VcZumSWSL3oL7 8QVP8K8OQHPxjzaq35BUYi0JkVVXii2fTNL11nX3Ov+DMztc0PhSRU07bkuSWKrvwX5tg06QzrrKo U1pJJnS8A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsovB-0000zD-2G; Tue, 07 Jul 2020 14:50:09 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsov6-0000yB-Ow for linux-arm-kernel@lists.infradead.org; Tue, 07 Jul 2020 14:50:05 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 74C90C0A; Tue, 7 Jul 2020 07:50:03 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E36123F68F; Tue, 7 Jul 2020 07:50:01 -0700 (PDT) Date: Tue, 7 Jul 2020 15:49:55 +0100 From: Lorenzo Pieralisi To: Pali =?iso-8859-1?Q?Roh=E1r?= Subject: Re: [PATCH] PCI: aardvark: Indicate error in 'val' when config read fails Message-ID: <20200707144955.GA17980@e121166-lin.cambridge.arm.com> References: <20200601130315.18895-1-pali@kernel.org> <20200619105618.aksoivu4gb5ex3s3@pali> <20200707135311.GB17163@e121166-lin.cambridge.arm.com> <20200707140244.uhmyoqd5mblz5ids@pali> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200707140244.uhmyoqd5mblz5ids@pali> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200707_105004_890541_FD6449E4 X-CRM114-Status: GOOD ( 22.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak , Rob Herring , linux-pci@vger.kernel.org, Xogium , linux-kernel@vger.kernel.org, Marek =?iso-8859-1?Q?Beh=FAn?= , Remi Pommarel , Bjorn Helgaas , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, Andrew Murray Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 07, 2020 at 04:02:44PM +0200, Pali Roh=E1r wrote: > On Tuesday 07 July 2020 14:53:11 Lorenzo Pieralisi wrote: > > On Fri, Jun 19, 2020 at 12:56:18PM +0200, Pali Roh=E1r wrote: > > > Hello Lorenzo! Could you please review this patch? > > > = > > > On Monday 01 June 2020 15:03:15 Pali Roh=E1r wrote: > > > > Most callers of config read do not check for return value. But most= of the > > > > ones that do, checks for error indication in 'val' variable. > > > > = > > > > This patch updates error handling in advk_pcie_rd_conf() function. = If PIO > > > > transfer fails then 'val' variable is set to 0xffffffff which indic= ates > > > > failture. > > > > = > > > > Signed-off-by: Pali Roh=E1r > > > = > > > I should add credit for Bjorn as he found this issue > > = > > Could you provide a lore archive link to the relevant > > discussion please ? I will apply it then. > = > Hello Lorenzo! Here is link to the Bjorn's email: > https://lore.kernel.org/linux-pci/20200528162604.GA323482@bjorn-Precision= -5520/ Thanks applied to pci/aardvark. Lorenzo > > Lorenzo > > = > > > Reported-by: Bjorn Helgaas > > > = > > > > --- > > > > drivers/pci/controller/pci-aardvark.c | 4 +++- > > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > = > > > > diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/co= ntroller/pci-aardvark.c > > > > index 53a4cfd7d377..783a7f1f2c44 100644 > > > > --- a/drivers/pci/controller/pci-aardvark.c > > > > +++ b/drivers/pci/controller/pci-aardvark.c > > > > @@ -691,8 +691,10 @@ static int advk_pcie_rd_conf(struct pci_bus *b= us, u32 devfn, > > > > advk_writel(pcie, 1, PIO_START); > > > > = > > > > ret =3D advk_pcie_wait_pio(pcie); > > > > - if (ret < 0) > > > > + if (ret < 0) { > > > > + *val =3D 0xffffffff; > > > > return PCIBIOS_SET_FAILED; > > > > + } > > > > = > > > > advk_pcie_check_pio_status(pcie); > > > > = > > > > -- = > > > > 2.20.1 > > > > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel