[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211012160505.3dov6gjnmxdq5lz6@theprophet>
Date: Tue, 12 Oct 2021 21:35:13 +0530
From: Naveen Naidu <naveennaidu479@...il.com>
To: Lukas Wunner <lukas@...ner.de>
Cc: bhelgaas@...gle.com,
linux-kernel-mentees@...ts.linuxfoundation.org,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
Amey Narkhede <ameynarkhede03@...il.com>
Subject: Re: [PATCH 16/22] PCI: pciehp: Use RESPONSE_IS_PCI_ERROR() to check
read from hardware
On 11/10, Lukas Wunner wrote:
> On Mon, Oct 11, 2021 at 11:37:33PM +0530, Naveen Naidu wrote:
> > An MMIO read from a PCI device that doesn't exist or doesn't respond
> > causes a PCI error. There's no real data to return to satisfy the
> > CPU read, so most hardware fabricates ~0 data.
> >
> > Use RESPONSE_IS_PCI_ERROR() to check the response we get when we read
> > data from hardware.
>
> Actually what happens is that PCI read transactions *time out*,
> so the host controller fabricates a response.
>
Ah! yes. Now that I look at it, RESPONSE_IS_PCI_TIMEOUT() does indeed
seem like a better option to RESPONSE_IS_PCI_ERROR(), since it's more
specfic and depicts the actual condition.
I'll wait for sometime and see if others have any objection/a better
name for the macro and then redo the patch with that.
Thank you very much for the review ^^
> By contrast, a PCI *error* usually denotes an Uncorrectable or
> Correctable Error as specified in section 6.2.2 of the PCIe Base Spec.
>
> Thus something like RESPONSE_IS_PCI_TIMEOUT() or IS_PCI_TIMEOUT() would
> probably be more appropriate. I'll leave the exact bikeshed color for
> others to decide. :-)
>
>
> > Signed-off-by: Naveen Naidu <naveennaidu479@...il.com>
> > ---
> > drivers/pci/hotplug/pciehp_hpc.c | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
>
> Acked-by: Lukas Wunner <lukas@...ner.de>
Powered by blists - more mailing lists