public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] PCI: fix search for suitable memory region
Date: Fri, 13 Nov 2015 10:53:02 +0000	[thread overview]
Message-ID: <5645C10E.60502@arm.com> (raw)
In-Reply-To: <CAEUhbmUQNq1dXDRGY7Bfe+b-1C+YRSMY=WmyzUZejrAQy62fzg@mail.gmail.com>

Hi Bin,

On 13/11/15 10:34, Bin Meng wrote:
> Hi Andre,
> 
> On Fri, Nov 13, 2015 at 6:06 PM, Andre Przywara <andre.przywara@arm.com> wrote:
>> Binary ANDing a value with 0 and comparing it against 0 always
>> yields true, I guess that's not intended here.
>> Use the proper mask value for the memory region type bit.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>>  drivers/pci/pci_common.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/pci_common.c b/drivers/pci/pci_common.c
>> index 07f1726..b8a9a14 100644
>> --- a/drivers/pci/pci_common.c
>> +++ b/drivers/pci/pci_common.c
>> @@ -231,7 +231,7 @@ phys_addr_t pci_hose_bus_to_phys(struct pci_controller *hose,
>>          * if PCI_REGION_MEM is set we do a two pass search with preference
>>          * on matches that don't have PCI_REGION_SYS_MEMORY set
>>          */
>> -       if ((flags & PCI_REGION_MEM) == PCI_REGION_MEM) {
>> +       if ((flags & PCI_REGION_TYPE) == PCI_REGION_MEM) {
>>                 ret = __pci_hose_bus_to_phys(hose, bus_addr,
>>                                 flags, PCI_REGION_SYS_MEMORY, &phys_addr);
>>                 if (!ret)
>> --
> 
> See commit 3526285068598f4e2ddaf19d4bd94f253de06ce9 "pci: fix checking
> PCI_REGION_MEM in pci_hose_phys_to_bus()" which is already in the
> mainline.

Ah, sorry, I missed that one (forgot updating the master branch).
Thanks for pointing this out!

Cheers,
Andre.

      reply	other threads:[~2015-11-13 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 10:06 [U-Boot] [PATCH] PCI: fix search for suitable memory region Andre Przywara
2015-11-13 10:34 ` Bin Meng
2015-11-13 10:53   ` Andre Przywara [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=5645C10E.60502@arm.com \
    --to=andre.przywara@arm.com \
    --cc=u-boot@lists.denx.de \
    /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