Skip to content
Commit 35262850 authored by Cheng Gu's avatar Cheng Gu Committed by Tom Rini
Browse files

pci: fix checking PCI_REGION_MEM in pci_hose_phys_to_bus()



When converting between PCI bus and phys addresses, a two pass search
was introduced with preference to non-PCI_REGION_SYS_MEMORY regions.
See commit 2d43e873.

However, since PCI_REGION_MEM is defined as 0, the if statement was
always asserted true: ((flags & PCI_REGION_MEM) == PCI_REGION_MEM)

This patch uses PCI_REGION_TYPE bit to check if the region is
PCI_REGION_MEM: ((flags & PCI_REGION_TYPE) == PCI_REGION_MEM)

Signed-off-by: default avatarCheng Gu <chenggu@marvell.com>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
parent 78e9e71c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment