From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Rob Herring" <robh@kernel.org>,
"Andrew Murray" <amurray@thegoodpenguin.co.uk>,
"Marek Behún" <marek.behun@nic.cz>,
"Remi Pommarel" <repk@triplefau.lt>,
"Tomasz Maciej Nowak" <tmn505@gmail.com>,
Xogium <contact@xogium.me>,
linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: aardvark: Indicate error in 'val' when config read fails
Date: Tue, 7 Jul 2020 15:49:55 +0100 [thread overview]
Message-ID: <20200707144955.GA17980@e121166-lin.cambridge.arm.com> (raw)
In-Reply-To: <20200707140244.uhmyoqd5mblz5ids@pali>
On Tue, Jul 07, 2020 at 04:02:44PM +0200, Pali Rohár wrote:
> On Tuesday 07 July 2020 14:53:11 Lorenzo Pieralisi wrote:
> > On Fri, Jun 19, 2020 at 12:56:18PM +0200, Pali Rohár wrote:
> > > Hello Lorenzo! Could you please review this patch?
> > >
> > > On Monday 01 June 2020 15:03:15 Pali Rohár 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 indicates
> > > > failture.
> > > >
> > > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > >
> > > 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 <helgaas@kernel.org>
> > >
> > > > ---
> > > > 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/controller/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 *bus, u32 devfn,
> > > > advk_writel(pcie, 1, PIO_START);
> > > >
> > > > ret = advk_pcie_wait_pio(pcie);
> > > > - if (ret < 0)
> > > > + if (ret < 0) {
> > > > + *val = 0xffffffff;
> > > > return PCIBIOS_SET_FAILED;
> > > > + }
> > > >
> > > > advk_pcie_check_pio_status(pcie);
> > > >
> > > > --
> > > > 2.20.1
> > > >
prev parent reply other threads:[~2020-07-07 14:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 13:03 [PATCH] PCI: aardvark: Indicate error in 'val' when config read fails Pali Rohár
2020-06-19 10:56 ` Pali Rohár
2020-07-07 13:53 ` Lorenzo Pieralisi
2020-07-07 14:02 ` Pali Rohár
2020-07-07 14:49 ` Lorenzo Pieralisi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200707144955.GA17980@e121166-lin.cambridge.arm.com \
--to=lorenzo.pieralisi@arm.com \
--cc=amurray@thegoodpenguin.co.uk \
--cc=contact@xogium.me \
--cc=helgaas@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=marek.behun@nic.cz \
--cc=pali@kernel.org \
--cc=repk@triplefau.lt \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=tmn505@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).