From: Thierry Reding <thierry.reding@gmail.com>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, Kevin Hilman <khilman@linaro.org>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Gregory Clement <gregory.clement@free-electrons.com>,
Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
Tawfik Bayouk <tawfik@marvell.com>,
Nadav Haklai <nadavh@marvell.com>,
Lior Amsalem <alior@marvell.com>,
Myron Stowe <myron.stowe@redhat.com>
Subject: Re: [PATCH] PCI: fixup __pci_read_base() after refactoring
Date: Tue, 18 Nov 2014 17:31:54 +0100 [thread overview]
Message-ID: <20141118163153.GA30151@ulmo> (raw)
In-Reply-To: <1416310271-4423-1-git-send-email-thomas.petazzoni@free-electrons.com>
[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]
On Tue, Nov 18, 2014 at 12:31:11PM +0100, Thomas Petazzoni wrote:
> In commit 7ea945f0bb49 ("PCI: Shrink decoding-disabled window while
> sizing BARs"), Myron Stowe refactored the code of __pci_read_base() in
> order to reduce the amount of time spent with decoding disabled.
>
> However, contrary to what was said in the commit log, the commit does
> introduce some functional change: the pci_size() function that used to
> be called *before* the BAR size check is done is now called *after*
> the BAR size check is done.
>
> This causes some failures on certain platforms (namely ARM Marvell EBU
> platforms, equipped for example with a PCIe SATA card, or a PCIe USB3
> XHCI controller):
>
> pci 0000:03:00.0: reg 0x10: can't handle BAR larger than 4GB (size 0xfffffffffff00000)
>
> This problem didn't exist before this commit, due to pci_size() being
> called before doing the PCI BAR size check. Therefore, this commit
> fixes the problem by restoring the initial order of the operation, by
> calling pci_size() before doing the PCI BAR size check.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Fixes: 7ea945f0bb49 ("PCI: Shrink decoding-disabled window while sizing BARs")
> ---
> Note: this fix has been tested to work correctly for me, and the PCI
> messages I get are now identical to the ones I was getting with
> 3.18-rc5. However, please review my patch carefully, as I must admit I
> do not fully understand all the implications of the change as well as
> the code in __pci_read_base().
>
> Applies on top of pci/next
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> drivers/pci/probe.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
I started seeing this same issue on Tegra today and I can confirm that
this patch fixes this regression:
Tested-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-11-18 16:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 9:55 Regression caused by "PCI: Shrink decoding-disabled window while sizing BARs" Thomas Petazzoni
2014-11-18 9:58 ` Thomas Petazzoni
2014-11-18 11:34 ` Thomas Petazzoni
2014-11-18 14:27 ` Bjorn Helgaas
2014-11-18 14:45 ` [PATCH] PCI: fix probe.c warning on !CONFIG_ARCH_DMA_ADDR_T_64BIT platforms Thomas Petazzoni
2014-11-18 18:18 ` Regression caused by "PCI: Shrink decoding-disabled window while sizing BARs" Yinghai Lu
2014-11-18 21:00 ` Thomas Petazzoni
2014-11-18 22:36 ` Yinghai Lu
2014-11-19 21:22 ` Bjorn Helgaas
2014-11-19 23:31 ` Yinghai Lu
2014-11-18 11:31 ` [PATCH] PCI: fixup __pci_read_base() after refactoring Thomas Petazzoni
2014-11-18 16:31 ` Thierry Reding [this message]
2014-11-18 17:37 ` Kevin Hilman
2014-11-19 22:14 ` Bjorn Helgaas
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=20141118163153.GA30151@ulmo \
--to=thierry.reding@gmail.com \
--cc=alior@marvell.com \
--cc=andrew@lunn.ch \
--cc=bhelgaas@google.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=gregory.clement@free-electrons.com \
--cc=jason@lakedaemon.net \
--cc=khilman@linaro.org \
--cc=linux-pci@vger.kernel.org \
--cc=myron.stowe@redhat.com \
--cc=nadavh@marvell.com \
--cc=sebastian.hesselbarth@gmail.com \
--cc=tawfik@marvell.com \
--cc=thomas.petazzoni@free-electrons.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).